Where is the R.java file in Android Studio? Can someone please help with this? I already tried google for the answer but can\'t find any solution.
R.java
is the generated file by ADT or Android studio. It will be located under app\build\generated\source\r
directory.
./app/build/generated/source/r/debug/android/support/v7/appcompat/R.java
./app/build/generated/source/r/debug/your/packagename/name/R.java
In my project in Android Studio 4.1
R.jar that you can actually unzip resides in app build folder, as follows:
jar -xf R.jar
Project/app/build/generated/source/r/debug/com.android.'projectname'/R.java
I use Android Studio 3.3.2
\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\android\support\constraint\R.java
I am using Android Studio 2.2.3 , the R.java file is shown in the picture below. Goto in the left upper side there is a selecting list ,
As noted above, "The new Android Gradle Plugin generates the corresponding bytecode directly and does not make the intermediate R.java file".
Using the ubuntudroid solution you can find an id
also this way. Find R.txt
and copy absolute path. Project > app > build > intermediates > runtime_symbol_list > debug > R.txt. Then right click and select Copy Path...
, 1. Absolute Path Ctrl+Shift+C
.
This way you will obtain a path to R.txt
, for instance, "C:\Users\user\AndroidStudioProjects\your_project\app\build\intermediates\runtime_symbol_list\debug\R.txt". Copy the path without R.txt
to a text file for future references, for example, with Notepad++.
Press Ctrl+Shift+F to find in directory. Insert an id
and the path.
== Old answer ==
Change a project view from Android
to Project
or Project Files
. Find one of these two files.
Then you can revert back to Android
view.