Reputation: 2528
When I create a new android project in Eclipse, and I choose to have a default main activity, my R.java file does not get generated.
I have seen some questions online and on this site about R.java not being generated but all are due to some manual action/mistake that had to be corrected during the development of the application.
However, does anyone know why R.java would not get generated for a brand new android project, where I have made no manual modifications whatsoever?
Upvotes: 3
Views: 6608
Reputation: 2426
ADT version 22 requires that you install "build tools". To get it to work i had to update:
Then install:
This link recommends you add build tools to your environment path. I had to do the following before the R.java was generated:
Upvotes: 1
Reputation: 1459
R.java creates every time when you create android project first time r.java created by default
so check for the errors and clean the project.
Upvotes: 0
Reputation: 11
Make sure your project is free of errors and problems. You can use Windows-View to find and rectify them. Common mistakes are in the layout files. Check the AndroidManifest file and see if the activity names match the classes in your source folder. Clean and rebuild.
Upvotes: 0
Reputation: 10081
I think your problem is just the latest update of the SDK.
Test the following operations on two projects :
I hope you have helped!
Upvotes: 3