I have updated my SDK
and ADT
to the latest version, I have also update the Eclipse
to Kepler
the latest one after
Changes in your Build target also can effect R.java in Eclipse so
Right Click Project >> Properties >> Android >> Select Latest(usually) Android API Platform >> Click OK
Hope this is helpful.
Proven successful method, check the file (AndroidManifest.xml) and delete all comments in it, and make sure there are no errors in this file, I tried and did work with me.
Yesterday, I made an update with sdk manager, and I had the same problem as you. I fixed the issue: I have updated another time the android sdk (with the sdk manager tool), then I check update from eclipse for install the updated ADT plugin and I rebuid my project. "Android sdk Build-tools" from Android sdk manager is now rev 17 and now it is OK. I think the issue is from adt plugin from eclipse
Follow These steps...
Eg : IF you selected api level 17 in properties you should install Android SDK Build Tools 17..
import android.R - remove this statement from all your classes and then do a clean your R file will be generated. if this did not work then check all your xml files for any errors and then do a clean. These 2 are the most common reasons for R file to go missing
I had same problem.. I solved by doing the following:
check all xml files and drawable files if there are any CAPITAL LETTERS in file name, if you have then change it to lower case, if you are using selector xml files then check the other files you are linking in those files..all should be lower case.
Go to java files which show error and remove IMPORT R.java file from imports list.
Go to Projects>>Clean.
This should fix the problem. This is how i fixed :)