Android ADT version 22, R.java files not generated

前端 未结 11 1195
借酒劲吻你
借酒劲吻你 2020-12-06 16:13

After upgrading to Android ADT version 22 and cleaning my project, the R.java files went missing. I can\'t use setViewContent(R.layout.activity_main) because the activity ca

相关标签:
11条回答
  • 2020-12-06 16:34

    I had the same problem, I just removed all the errors in my source files and xml files then R.java was generated.

    0 讨论(0)
  • 2020-12-06 16:41

    I had the same exact problem after updating to SDK 22. There seems to be an issue in the Android SDK update process that the process needed to run twice to update the SDK Tools completely. Make sure you check the SDK manager a few times by closing and re-opening the SDK manager (not Eclipse) to load the new updates. Then restart eclipse and check the SDK manager again. Make sure all items are updated. Then clean your projects and R.java will get created again.

    0 讨论(0)
  • 2020-12-06 16:41

    The Same problem happened to me also,

    1.Check that Android SDK Build-tools is installed. Window->Android SDK Manager->Tools->Android SDK Build-tools 2.Make sure when you update the Android SDK Tools, you also update the Android SDK Platform-tools and Android ASK Build-tools. Build fails silently if they don't match.

    Solution

    1.Update Android SDK Tools and Android SDK Platform-tools and Android SDK Build-tools from Android SDK Manager (Window->Android SDK Manager->Tools->Android SDK Build-tools).Then restart the eclipse.

    0 讨论(0)
  • 2020-12-06 16:42

    Not enough credits (yet :-) ) to vote up or comment directly on Rany A. Ishak's answer, but after one day lost trying to fix these silly problems, I'm very confident I've found the right solution...I'm installing Android SDK Build-tools right now, I'll get back soon on this!

    0 讨论(0)
  • 2020-12-06 16:47

    I tried the following. Let the application name be "My First Application". Then the name of the package should be com.xx.myfirstapplication.yy. Make sure that you add a yy after the application name in the package field while creating the application. Hope it helps.

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