I am trying to run Android sample applications using intellij idea and R.Java file is missing form notepad samples source directory.
Make sure you have the right settings: project structure -> Facets -> Android -> yourproject -> compiler
Check compile resources by IDE and Regenerate R.java when resources are changed.
This stole most of my morning, hopefully I'll save someone else some time:)
Make sure you have a gen
folder in your project root. If you don't, make one yourself.
Use Build | Make. Actually, IDEA generates R.java file automatically every time you make a change in any XML file under the /res directory.
UPDATE: /gen directory must be present in the project and also configured as a Source root in IDEA module so that it can resolve the IDs in your source code.
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