I'm reading a book in that book they say I can find R.java file in some sort of path but I go thought the path they said I can't find the file and I think in latest version of android studio looks like they changed it , so now where I can find the r.java file
Asked
Active
Viewed 135 times
0
-
GUYS answer for this questions , you can find in the given link https://stackoverflow.com/questions/61719632/how-to-find-the-r-file-in-android-studio-2020 – Sep 18 '21 at 17:38
-
Please provide enough code so others can better understand or reproduce the problem. – Community Sep 22 '21 at 10:27
1 Answers
1
The R file is a generated class. The easiest way to find it is opening any activity you like say the MainActivity
which comes in by default
You will have something like this in the onCreate
function
public void onCreate(Bundle bundle){
setContentView(R.layout.activity_main):
}
In this method you can find the R
class. To know what's actually inside it you can hover your mouse pointer over the R and then Ctrl + Click( Win, Linux) or Cmd + Click (mac) it to get to the definition

gtxtreme
- 1,830
- 1
- 13
- 25
-
-
@Youtheone: did you build your project at least once before trying this? – Joachim Sauer Sep 15 '21 at 17:06