R.Java not generated

后端 未结 11 1861
独厮守ぢ
独厮守ぢ 2020-12-19 03:27

I have downloaded code from google codes but when I import that project in my eclipse IDE it does not generate R.Java file.I searched many blogs and forums and tried many th

相关标签:
11条回答
  • 2020-12-19 04:16

    Simply click on

    Build --> Clean Project
    

    This worked for me

    0 讨论(0)
  • 2020-12-19 04:17

    When i come across this problem I delete the gen folder and it will be recreated with all the r files

    0 讨论(0)
  • 2020-12-19 04:21

    In my case, i found an image file name containing an uppercase inside res/drawable. after changing the image name. it was solved and i could build the project

    0 讨论(0)
  • 2020-12-19 04:28

    you will see at the top of your file it says import android.r or r.java i forget. you need to remove this line, clean the project, and rerun.
    basically android uses R to reference items within your project. but when that import statement is there it overrides looking at your project directories and uses androids

    0 讨论(0)
  • 2020-12-19 04:28

    I faced this problem many times. The rule of thumb is to check your .xml files.
    R.java is not generated when there is any issue in .xml file.

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