android開發中eclipse容易出現的問題

來源:互聯網
上載者:User

搞過android開發的人應該都有遇到eclipse裝怪的時候吧,反正我有幾次就想扔磚頭砸電腦。下面是我遇到的幾個常見的問題:

1:ADB server didn't ACK failed to start daemon  ,這個是我遇到過最多的問題,

[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步:

    <1>拔掉usb

    <2>su

    <3>adb kill-server

    <4>adb start-server

    <5>插上USB,adb devices

 

3: eclipse中匯入android項目的時候若提示有檔案唯讀,那麼就修改這檔案的許可權,然後再重新開啟eclipse再匯入即可。

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下面,如果放在上面的話會顯示null 指標異常

轉帖:http://m.oschina.net/blog/75562

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.