I have the R.java file generated but I'm still getting "R cannot be resolved" all throughout my code. Can anyone help? It is not a problem with the R.java file and there are no problems in the xml files
Asked
Active
Viewed 253 times
0
-
1here is the same problem. - http://stackoverflow.com/q/885009/601868 – Natali Feb 13 '12 at 13:39
-
1I removed the [tag:r] tag, since this question is not about the R-project. – Andrie Feb 13 '12 at 14:07
4 Answers
2
A couple of options:
- Make sure you import your R into the class (com.myactivity.R instead of android.R)
- Sometimes other errors can prevent the R from generating. Fix those first, then R will regenerate and the R problems will disappear.
- You could also try to do a clean of the project. In Eclipse this would be Project - Clean...

nhaarman
- 98,571
- 55
- 246
- 278
-
Well I have R.java, nothing is keeping that from generating. Also I've tried cleaning it and that did nothing. – user1185205 Feb 16 '12 at 13:27
0
Try to Delete the R.Java, it will be automatically recreated & the issue will be resolved.

Yaqub Ahmad
- 27,569
- 23
- 102
- 149
0
might be a problem in one of the XML files - have a look into the console - often errors show up there and tell you where to look

ligi
- 39,001
- 44
- 144
- 244