I import a project to Android Studio , but the R.java is always empty.
public final class R { }
I have tried:
But they are not take effect.
Android R. java is an auto-generated file by aapt (Android Asset Packaging Tool) that contains resource IDs for all the resources of res/ directory. If you create any component in the activity_main. xml file, id for the corresponding component is automatically created in this file.
What is the role of the R. java file in an Android application project? A. It contains all resource IDs allowing the developer to reference them from the code using integers.
Goto File -> Settings -> Compiler now check use external build
then rebuild project
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