您的位置:首页 > 移动开发 > Android开发

Android 常见错误

2011-03-30 11:32 417 查看
我只说下我遇到的几个问题和解决的方法

一, 新建项目出错,提示:missing required source folder GEN

解决方法,把gen目录下的R.java删除,项目自动刷新出一个新的R.java,解决

二,run的时候出错: Activity class {XXX} does not exist

原因是没有指定执行包

解决方法 : 在launch里指定要执行的包

三,缺少Virtual Device 也就是常说的AVD(Android Virtual Device)

解决办法:看网上说的又是执行命令又是什么的,说的有些乱

我的解决办法就是不要管,执行的时候会提示你新做一个AVD,按着提示填个AVD的名字,然后再选个版本,搞定

.

四,最后还是报了一个warning : ActivityManager: Warning: Activity not started, its current task has been brought to the front

* If the project contents haven't changed, the app will not be downloaded a second time.

如果项目内容没有被改变,应用将不被再次下载,所以如果不修改内容再次运行程序会报此错误。

* If the project contents have changed, but the project hasn't been built, the app won't be downloaded. Normally, auto-build is turned on, but there is a "Build Automatically" setting and if it's turned off, your app won't build when you press "Save".

如果项目的内容已经被改变了,但是项目可能没有重建,应用程序也不会被再次下载。正常情况下,auto-build是被打开的,但是如果设置中的"build Automatically"是被关着的,那么即使你修改程序了,保存了,也不会被重建的。

查看“build Automatically”:Windows->Preferences->General->Workspace Build Automatially *is* checked

点开图标,显示运行效果

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/shiyuntian_wang/archive/2010/03/25/5414437.aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: