英文:
R.java file is missing/not generated in android studio
问题
我正在学习如何开发应用程序。
我在build > generated
目录下找不到任何R目录。我尝试了其他关于相同问题的Stack Overflow答案,并尝试了清理项目和重建项目,并检查了Android SDK工具是否已安装。它已经安装了。如何找到R.java文件。
英文:
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.
答案1
得分: 2
这是由Android Gradle Plugin直接生成R类字节码而不是.java文件引起的。
因此,没有生成任何R.java文件,如果您需要关于R类的信息,可以按照这个答案中描述的步骤查看类字节码。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论