This happens for a new project too!
The gen folder is empty. No errors in activity_main.xml file.
I have tried:
but still the gen folder is empty! help!
This solved my problem: Eclipse giving error, missing R.java file after recent update
It was the latest ADT update. After the update we need to install android sdk build-tools.
I assume you have updated ADT with version 22 and R.java file is not getting generated.
If this is the case, then here is the solution:
Hope you know Android studio has gradle building tool. Same as in eclipse they have given new component in the Tools folder called Android SDK Build-tools that needs to be installed. Open the Android SDK Manager, select the newly added build tools, install it, restart the SDK Manager after the update. Got this answer from this link. Eclipse error: R cannot be resolved to a variable
It's working for me now
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With