建了第一个测试程序就不是那么顺利,接连遇到了几个问题,首先是
no classfiles specified
Conversion to Dalvik format failed with error 1
晚上说用Project菜单下的Clean命令清理一下就好了,果然如此。
据查到的国外网站说,还有一种办法:
If you are using eclipse.
Click on the project folder in the "Package explorer" and click F5(refresh).
It should work now.
接下来遇到的问题是:
r cannot be resolved
重新建了一遍项目就OK了。不过出现错误的时候我建的项目用了Android+Google API,后来只用Android就好了。
还可尝试的办法(每条之间的关系是“或”):
1. 删除gen目录,让Eclipse重新build一下。
2. 重新build项目。
3. add import android.R to your ".java" file