Reputation: 2238
I tried to clean my project through Project->Clean and then suddenly all my R.java files in all my projects have been deleted. I don't know how to regenerate it now because I have hundreds of errors now...
How do I get my R.java files back?!
Upvotes: 0
Views: 69
Reputation: 525
This happened to me yesterday, there are a few options you can try.
First try building the project again.
If that fails, try removing the gen
file in eclipse and clean again
If that fails, try checking your xml
files if there is any error
If everything fails, create a new project and copy-paste all layouts
/src
files to the new project.
EDIT: I searched for this yesterday, and I tried every possible solution, but only creating a new project helped.
Upvotes: 1
Reputation: 2621
R.java files are generated automatically by Eclipse. Check if you have Project > Build Automatically checked or not. If not, check it and it should resolve your issue. Alternatively, check your project for other errors, preventing the R.java files form being generated.
If the issue still persists, try restarting Eclipse.
Upvotes: 0
Reputation: 14398
Do follwing tasks:-
R.java
file will not be created.Please solve the errors and then try to clean the project.
Or If no resource errors then try this step also In Eclipse :
If an update for ADT is available, select it and clickFinish. Restart Eclipse.
Upvotes: 0