Wednesday, December 30, 2009

My first "R cannot be resolved" error with Android

When I new a project for an Android sample, I intentionally select a Android 2.0.1 platform to see what happens. The program editing part seems OK. However, when I test run the program, there is an error message saying that the default AVD cannot be used. I have to find another AVD. Then, I try to fix the project property to fall back to use the Android 1.5.0 platform and test run again. Now, error message keeps up coming.

The first error message is "R cannot be resolved!". When I search the internet, I come across many replies, but non of them works. Also, they introduce other messages such as "Build Path error", "The project cannot be built until build path errors are resolved" & "missing required source folder 'gen'". I even delete the 'gen' folder, it still cannot solve the problem. I also try to copy a 'gen' folder from other sample projects, this method does not work either.

At last, what I can do is to give up this project. New another project with Android platform 1.5.0 to do this ample program again. This is a much faster way.


No comments:

Duplicate Open Current Folder in a New Window

Sometimes after I opened a folder in Win7, I would like to duplicate open the same folder again in another explorer window. Then, I can ope...