I moved my project on Eclipse by Right Click project > Refactor > Move. This caused (at first) an exclamation mark to show next to project name. So I restarted Eclipse. This removed the exclmation mark, but now my entire Activity file's R. references have errors. I tried:
Deleting R.java file and it regenerated automatically.
Cleaned the project few times.
Changed target build set back and forth. Still no luck.
There are no errors anywhere else. Just my MainActivity file inside src\com.* folder.
Check if you are importing android.R
instead of your generated R
class.
From Using Eclipse:
Note: Eclipse sometimes likes to add an import android.R statement at the top of your files that use resources, especially when you ask eclipse to sort or otherwise manage imports. This will cause your make to break. Look out for these erroneous import statements and delete them.
In the other hand, check if you have any errors in a xml file (but it shouldn´t allow you to generate the R.java
file)
Are you creating Project name folder to another workspace on move??