Eclipse stops creating R.java

Today I upgrade ADT to 22.0.1.v201305230001--685705 and find that Eclipse has stopped generating R.java. I thought this was an Eclipse problem because I am creating a completely new clean Android project and I can’t even run it as an Android application. I can not find the files in the gen folder. Eclipse version is 4.2.2, is there any way to solve it?

I am trying to use Eclipse 4.3 with the latest version of ADT, but the problem still exists.

+4
source share
4 answers

I had the same problem.

Open the android SDK manager and install the new Android build tools. Without this, you can no longer create anything.

For some reason, they shared them, and many people do not notice.

enter image description here

+6
source

Try to delete the bin folder and clean up the project ... and in Eclipse an option is automatically created in the "Project" menu. This will help you create an R.java file every time changes are made. The option "Clean ..." also exists in the "Project" section. This seems to be a common problem with many different answers.

+2
source

Update android-sdk, I think sdk needs Android SDK Build-tools . To update, follow these steps: Go to Window-> Android SDK Manager. Update and install all the tools ( Android SDK Tools, Android SDK Platform-tools, Android SDK Build-tools ) that are in the Tools folder.

image

+2
source

Check the xml files of your layout, whether they are saved correctly without errors or not.

I ran into a similar problem that suddenly R.java disappeared and the eclipse could not restore it after creating the SDK. I checked the SDK manager and saw that the Android SDK build tool was perfectly installed. Finally, I noticed that there are some errors in the xml files. After fixing and saving those, R.java is automatically generated in my case.

+1
source

Source: https://habr.com/ru/post/1488633/


All Articles