android开发中eclipse容易出现的问题

搞过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

相关文章
相关标签/搜索