Developing for Android in Eclipse: R.java not regenerating

前端 未结 30 3194
孤城傲影
孤城傲影 2020-11-21 07:04

I\'ve found out that my R.java is never updated, so it doesn\'t contain information about my new resources, so I decided to delete it and thought that Eclipse would generate

30条回答
  •  失恋的感觉
    2020-11-21 07:40

    R.java will never be generated if there are any errors in the res folder. For example, in the drawable subfolder there are two files which have the same name, one is icon.png and the other is icon.html.

    You can see some error in the Eclipse console log window which is saying "Resource entry icon is already defined.". After deleting icon.html, you can clean or just delete the gen folder. You will find that R.java is created.

提交回复
热议问题