Search code examples
androidactionbarsherlockactionbarsherlock-map

R cannot be resolved to a variable


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.


Solution

  • 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.