搞過android開發的人應該都有遇到eclipse裝怪的時候吧,反正我有幾回就想扔磚頭砸電腦。下面是我遇到的幾個常見的問題: java
1:ADB server didn't ACK failed to start daemon ,這個是我遇到過最多的問題, linux
[2012-08-31 10:40:37 - GPS] The connection to adb is down, and a severe error has occured. [2012-08-31 10:40:37 - GPS] You must restart adb and Eclipse. [2012-08-31 10:40:37 - GPS] Please ensure that adb is correctly located at 'D:\Program Files\Android\android-sdk\platform-tools\adb.exe' and can be executed.網上有說一些方法,好比說在任務管理器裏面關閉adb.exe,再重啓eclipse,或者重啓電腦,可是我發現有一個頗有可能解決問題的方法。由於你們作android開發嘛,或多或少會使用真機開發,就極可能會使用豌豆莢這個軟件,而後在你鏈接上電腦之後,雖然有時候豌豆莢沒有打開,可是你在任務管理器裏面你會看到兩個與豌豆莢相關的程序是打開的,wandoujia_daemon.exe,和wandoujia _helper.exe,刪掉這兩個進程再重啓eclipse便可。
2: linux下)第一次將真機連上電腦的時候adb devices顯示???????????no permission,4步: android
<1>拔掉usb shell
<2>su api
<3>adb kill-server app
<4>adb start-server eclipse
<5>插上USB,adb devices google
3: eclipse中導入android項目的時候若提示有文件只讀,那麼就修改這文件的權限,而後再從新打開eclipse再導入便可。 spa
4:Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY,我用的平板是聯想的A2107,在使用google map api的時候出現這種狀況,好像是聯想把maps.jar精簡了,處理方法: 指針
<1>用DDMS導出com.google.android.maps.jar(位於system/framework)和etc/permissions/platform.xml文件
<2>將你下載的com.google.android.map.jar再導入system/framework
<3>在導出的platform文件裏面添加<library name="com.google.android.maps" file="/system/framework/com.google.android.maps.jar"/>,再將此文件導入etc/permissions/platform.xml,重啓
5:
Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
Please check logcat output for more details.
Launch canceled!
settings->applications->mange
applications-> select the application->select "unistall".
這樣就能完全刪除了,而後再從新安裝這個apk就沒問題了
6:頭兩天在activity中啓動新intent的時間,eclipse顯示不能實例化,而後我將我要調用的activity設置成public,成功
7:實例的獲取應該放在setContentView下面,若是放在上面的話會顯示空指針異常
8:在linux下向手機push文件時,若是顯示Read-Only File System ,那麼adb shell ->su ->mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system