Eclipse giving error, missing R.java file after recent update

前端 未结 14 1593
猫巷女王i
猫巷女王i 2020-11-22 10:43

I have updated my SDK and ADT to the latest version, I have also update the Eclipse to Kepler the latest one after

相关标签:
14条回答
  • 2020-11-22 11:02

    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.

    0 讨论(0)
  • 2020-11-22 11:03

    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.

    0 讨论(0)
  • 2020-11-22 11:06

    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

    0 讨论(0)
  • 2020-11-22 11:07

    Follow These steps...

    1. Right Click Your Project.
    2. Select Properties->Android Check Project Build Target and API Level.
    3. Again come back and open Android Sdk Manager Chekc the Tools and make sure you are installed Curresponding Android SDK Build Tools.

    Eg : IF you selected api level 17 in properties you should install Android SDK Build Tools 17..

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2020-11-22 11:09

    I had same problem.. I solved by doing the following:

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

    2. Go to java files which show error and remove IMPORT R.java file from imports list.

    3. Go to Projects>>Clean.

    This should fix the problem. This is how i fixed :)

    0 讨论(0)
提交回复
热议问题