Search code examples
javaandroid-studio-4.0

R.java file is missing/not generated in android studio


I am learning how to develop apps.

I couldn't find any R directory inside build>generated. I tried with other stack overflow answer of this same issue and tried clean project and rebuild project and checked whether android sdk tool are installed or not. It is installed. How to find R.java file.

enter image description here


Solution

  • enter image description here

    This is caused by Android Gradle Plugin generating R class bytecode directly, instead of .java files.

    So there isn't any R.java file being generated and if you need information about the R class, you can have a look at the class bytecode by following the steps described in this answer.