Android第六課 安裝異常處理
通過軟件管理,將即將安裝的XXX.apk的同名軟件卸載,然後進入到安裝包中,點擊XXX.apk
2 拷貝文件夾失敗
打開設置,選擇存儲,找到USB計算機連接,大容量連接電腦
3 NDK location not valid in preferences
該原因是NDK沒有配置的原因
4 Unable to launch cygpath
IsCygwin on the path?] java.io.IOException: Cannot run program"cygpath": CreateProcess error=2, 系統找不到指定的文件。
5.5
Description Resource Path Location Type
The container 'Android Dependencies'references non existing library'D:\Javaworkplace\appcompat_v7\bin\appcompat_v7.jar' helloworld Buildpath Build Path Problem
emulator:ERROR: Unable to load VM from snapshot. The snapshot has been saved for adifferent hardware configuration.
5 eclipse菜單沒有AndroidVirtual Device Manager
在eclipse中的window→Customize Perspective→Command Groupsavailability→Available commandgroups
然後找到,通過setXXX才可以
6 Android Dependencies問題
錯誤問題:
Description Resource Path Location Type
The container 'Android Dependencies'references non existing library'D:\svn\_test_android\appcompat_v7\bin\appcompat_v7.jar' hello Buildpath Build Path Problem
6.1解決歷程
這些問題是否與build path有關
是否是Java Build Path問題,如下:
結論:結果發現其實Android 5.1.1可以不勾選,保持默認即可
7 Unable to resolve target 'android-19' until the SDK is
描述如下:Description Resource Path Location Type
Unable toresolve target 'android-19' until the SDK is loaded. anddt Unknown Android Target Problem
7.1解決裏程碑
1、打開android sdk manager,步驟如圖:
2.查看開發環境安裝的sdk的對應API號碼,下圖中的對號碼為19,參考下圖,找到你的環境版本號
3.打開導入工程目錄下的project.properties文件,打開工具為記事本
4.找到android-xx這一行,將xx數字修改改為步驟二中得到的數字,這時候再打開工程就可以了
# Project target.
target=android-19
修改後的結果:
# Project target.
target=android-18
詳細的解釋:
default.properties 裏的target選取對應的
或右鍵工程屬性 properties =》 android => android build target 選擇庫
也就是庫API選擇不正確
我們應該選擇哪個庫值得思考!!!
8 The project was not built since its build path isincomplete
詳細描述:
The project wasnot built since its build path is incomplete. Cannot find the class file forjava.lang.Object. Fix the build path then try building this project anddt Unknown Java Problem
The typejava.lang.Object cannot be resolved. It is indirectly referenced from required.class files Common.java
解決方案:
看看project -- BuildAutomatically有沒有勾上?如果沒有,勾上以後,clean一下,重啟eclipse
9 Could not delete '/test/bin/classes/cn'.
Description Resource Path Location Type
The project was not built due to"Could not delete '/test/bin/classes/cn'.". Fix the problem, thentry refreshing this project and building it since it may be inconsistent anddt Unknown Java Problem
解決方案:進入到test/bin/classes/目錄,手動刪除cn目錄
Description Resource Path Location Type
The project cannot be built until buildpath errors are resolved test Unknown Java Problem
Description Resource Path Location Type
R cannot beresolved to a variable MainActivity.java /feng/src/com/example/feng line 13 JavaProblem
Errors occurred during thebuild.
Errors running builder 'Android Package Builder' on project'appcompat_v7'.
Problems encountered while deleting resources.
Could not delete 'D:\doc\_hello\appcompat_v7\bin\appcompat_v7.jar'.
Problems encountered while deleting files.
Could not delete: D:\doc\_hello\appcompat_v7\bin\appcompat_v7.jar.
Problems encountered while deleting resources.
Could not delete 'D:\doc\_hello\appcompat_v7\bin\appcompat_v7.jar'.
Problems encountered while deleting files.
Could not delete: D:\doc\_hello\appcompat_v7\bin\appcompat_v7.jar.
10Activity not started, itscurrent task has been brought to the front
原因分析:因為你的模擬器中還有東西在運行,也就是你要運行的activity已經有一個在模擬器中運行了。不要以認為模擬器退出到桌面了就沒有東西在跑了。在你調試的時候異常關閉的程序有可能就有activity在運行。
解決方法:project->clean。
11 Android:安裝時提示:INSTALL_FAILED_INSUFFICIENT_STORAGE
說明存儲卡的空間不足,可以使用adb shell,登陸手機使用df查看/data的存儲空間,解決方案是刪除多余的軟件
Android第六課 安裝異常處理