I have implemented the actionbarsherlock in my project and after implementation and my project is full of errors and it is "R cannot be resolved to a variable". I have tried a lot to clear this and i cant get the solution.Please help me to solve this.
Asked
Active
Viewed 334 times
1
-
2If you have an error in an XML file, the R.java file won't be generated by the resource compiler. Check the error messages. – Ted Hopp Mar 25 '13 at 04:46
-
Check your all xml files and clean your app once and build. – RajaReddy PolamReddy Mar 25 '13 at 04:54
-
Thanks a lot!I have fixed the problem. – G.V.Raghuram. Mar 25 '13 at 05:46
3 Answers
2
If you your code contains errors then R.java won't generate, if the errors are about R.java then Just clean the project once, and build it again. If the erorrs are not resolved then check for the imports you may have mistakely imported android.R.java.

Pragnani
- 20,075
- 6
- 49
- 74
-
-
@G.V.Raghuram. Good to know that...If you feel it helps you mark this as answer by clicking on the right mark beside the answer – Pragnani Mar 25 '13 at 05:51
0
first otion is make project clean
and Rebuild
your project
or if there is any image name
in drawable
missing in Uppercase
or any other option with not allowed may possible to check,
or in xml layout check all files is well define and is that no any xml error
due to this resone may R
file is remove

Ankitkumar Makwana
- 3,475
- 3
- 19
- 45