Where is the R.java file in Android Studio?

前端 未结 11 800
暖寄归人
暖寄归人 2020-12-04 19:24

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.

11条回答
  •  醉酒成梦
    2020-12-04 20:16

    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.

提交回复
热议问题