且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Android Studio项目中应在哪里创建gen/R.java?

更新时间:2023-11-16 17:14:46

R.java. 您可以在以下位置找到它:

R.java will be automatically created for your project by android-studio once you build the project. You can find it at:

您的应用名称/app/build/generated/source/r/debug/您的程序包名称/R.java

your_app_name/app/build/generated/source/r/debug/your_package_name/R.java

您可能在android-studio的项目浏览器中看不到该文件夹​​,因为默认情况下该文件夹设置为Android视图.将其更改为项目视图.

You might not be seeing that folder in the project explorer of android-studio, because by default it's set to Android view. Change it to Project view.