Android ADT version 22, R.java files not generated

前端 未结 11 1194
借酒劲吻你
借酒劲吻你 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:26
    1. Update Android SDK Tools and Android SDK Platform-tools and Android SDK Build-tools from Android SDK Manager

    2. Add abover dir to your ENV $PATH

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

    Android SDK now has a special package: Build Tools. It was not present in earlier SDK versions, and seems like it MUST be installed in order to generate those R files. It is now the one package that does that stuff. (And probably everything else regarding building for Android). So, if you not have that installed (and you will likely not have if you just upgraded the SDK), it's like missing a compiler - you can't ever expect your code to be compiled if there is no compiler.

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

    The solution for this is, open "Android SDK Manager". Download "Android SDK build tools". Then for safety, restart your eclipse. That's it. Back to normal. All apps start building.

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

    I had the same problem just solved it.

    check:Java/Eclipse - No more R file ever

    More info:https://groups.google.com/forum/?fromgroups=#!topic/android-developers/rCaeT3qckoE%5B1-25-false%5D

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

    In Eclipse, go to Project menu,there is an option build automatically, click it. That would help you build the R.java file everytime modifications are made in your project. The Clean option is also there under Project. It will help you.

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

    This is.... "Much ado about nothing"!!!

    In my case there is error due to "&" inside strings.xml file(but error not shown) for declaring string for a array type. Now the problem has been solved as I changed "&" to "and".

    So, please make sure that you do not have such silly use of symbols, and clean the project.

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