Android開發過程中遇到的問題集合(—)
1. Re-installation failed due to different application signatures.
將原來的軟體包刪除掉,然後重新安裝一次就好了。在命令列上運行:adb uninstall ,這裡的package_name也就是AndroidManifest.xml裡面元素package屬性的資料值。例如:adb uninstall org.andriod.demo。關於刪除也可以參考 6.如何刪除軟體包 這個部分的說明
2. emulator: ERROR: unknown virtual device name: 'My_Android'
設定環境變數ANDROID_SDK_HOME,指向Andriod的SDK目錄.
3. ddms - Failed to initialize Monitor Thread: Unable to establish loopback connection
防火牆可能阻擋了adb server的啟動,關閉防火牆即可,重新啟動adb server。進入dos 命令環境運行如下的指令:adb kill-server 和 adb start-server
4. Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
如果是Emulator提示這樣的資訊的話,可能是記憶體不足。在啟動Emulator的時候,添加參數-partition-size 120
5. WARNING: Application does not specify an API level requirement!
通常的錯誤的資訊是:
[2010-10-23 08:15:28 - AppName] WARNING: Application does not specify an API level requirement! [2010-10-23 08:15:28 - AppName] Device API version is 8 (Android 2.2)
在AndroidManifest.xml檔案中,使用來指定API的層級。例如:
6. 如何刪除軟體包
方法一、通過adb命令列。adb uninstall
方法二、通過裝置的管理軟體Settings來刪除。Setting --> Applications --> Manage Applications來刪除軟體
7.Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it's being used by something else, choose a new port number in the preferences.
解決辦法:在防火牆進階進階設定中,對連接埠8700進行 出戰設定和入站設定
更多待續