1)ActivityManager: Warning: Activity not started, its current task has been brought to the front
原因是:两个应用起了同样的名字,模拟器总是识别第一个解决方法是:重新启动一边模拟器;如果还是不行,可以先把模拟器delete掉再重新add就可以了.
2)Failed to install HelloWorld.apk on device timeout
原因:
由于模拟器已经开启而没有关闭或者非法关闭引起的。
解决方法:
删除 C:\Documents and Settings\Administrator\.android\avd\对应版本.avd
下所有以.lock结尾的文件夹。
http://www.voidcn.com/article/p-qlydhlba-btc.html
3)check all projects
检查所有的项目?
4)使用android模拟器,怎么老是显示android的启动画面,进不去?
换成android 4.2(17)的api就ok;
5)Eclipse如何打开Package Explorer?
用以下方法打开:
Window ----- Show View ---Package Explorer
6) 在使用eclipse的在布局文件时,有时编辑一些控件的字符串名字中,有时会提示诸如“Hardcoded string "下一步", should use @string resource”的警告,这是什么原因呢?
应该在res/values/strings.xml中设置:
Button1
引用的时候使用:android:text="@string/message"就行了。
7)Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this
version. Consult the android.os.Build.VERSION_CODES javadoc for details.
Android Runtime和Dalvik会根据target SDK version决定是否工作在『兼容模式』下,所谓兼容模式,就是关闭了新版本中各种新机制和体验优化的状态。targetSdkVersion如果设置很低,
就等于是关闭了所有高版本的新特性和机制,包括『屏幕自适应』、『硬件加速』。
为了保证各个版本的兼容性,及时使用到新特性,
targetSdkVersion因随Android最新版本的发布而持续提高,以保证在各个Android版本的设备上都能获得完整的体验。
8)Unexpected text found in layout file: """
答复:Ctrl+Shift+F ,删掉多余的字符;
9)Can't bind to local 8700 for debugger
Set Base local debugger port to "8601"
Check the box that says "Use ADBHOST" and the value should be "127.0.0.1"
10)android Uri.parse Unfortunately has stop
12-04 09:51:38.369: E/AndroidRuntime(824): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=Intent.ACTION_DIAL dat=tel:xxxxxx }
开始以为是权限不对,在AndroidManifest中增加了权限,还是不行;
将代码修改成这样;
//Intent intent=new Intent("Intent.ACTION_DAIL");
Intent intent=new Intent("android.intent.action.CALL");
intent.setData(Uri.parse("tel:10086"));
startActivity(intent);
解决问题,同样,如果要打开网页,使用以下代码:
Intent intent=new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse("http://www.baidu.com"));
startActivity(intent);
11)ActivityManager: Warning: Activity not started, its current task has been brought to the front project->clean