Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
183 views
in Technique[技术] by (71.8m points)

Where is the R.java file in Android Studio?

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.

question from:https://stackoverflow.com/questions/28522144/where-is-the-r-java-file-in-android-studio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Based on the new stable release of Android Studio (3.6) we have: enter image description here

So, now to find your generated resource classes you need the following steps:

1) Open your project.

2) Go to your module build path.

3) Open the outputs/apk/debug/app-name-debug.apk file.

4) Choose your classes.dex file.

5) Look at the down placed area and go to your full package path.

6) You can see all bytecoded resource classes. So, scroll down to what you are looking for.

enter image description here

7) Expand the resource class you need to proceed (for example, let it be R.id)

enter image description here

8) Go to you id's.

enter image description here

That's it.

UPDATE:

If you would like to see actual id integer number you should follows steps below:

1) By (7) Go to the resource class you need to proceed and right click to show the context menu

2) Choose "Show Bytecode" to see the flexible dialog "DEX Byte Code for R$id", for example, for id class

enter image description here

3) Scroll down to the actual id to look its number

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...