After cleaning the android project, the R.java file disappeared. Accordingly, I cannot start the project ... Once 20 did the cleaning, the file does not appear. Can someone tell me how to restore it?
4 answers
- Check for errors in the markup files.
- Errors in the classes.
- Run again.
- Thanks, it helped. - Sashka
|
Try creating a new project using import or just copying all the code. In theory, everything should turn out =)
|
The surest way is to generate it manually via aapt:
$aapt package -m -J <SOURCE_FOLDER> -M AndroidManifest.xml -S res -I <SDK_PATH>/platforms/android-xx/android.jar
- SOURCE_FOLDE R - source directory
- SDK_PATH - the path to the Android SDK
- xx - API number
In general, most likely you have an error in AndroidManifest.xml - check again
|
R.java is a file that is automatically generated, you don’t need to add or change anything in it. If you have a project without errors, just update the list of folders and that's it. If R.java is not generated and you have the entire project in error, look at the Console log (this is if you are working in Eclipse) where the error is written in which file. Fix it and R.java itself will appear.
|