Android Studio R.java

前端 未结 6 2061
太阳男子
太阳男子 2021-02-05 12:35

I\'m seeing a crash on an older device that works on multiple newer devices:

android.content.res.Resources$NotFoundException: Resource ID #0x7f030035
         


        
6条回答
  •  我在风中等你
    2021-02-05 13:16

    So this took a lot of trial and error and google searches but finally have cracked it. After renaming your Android Project in

    • File --> Project Structure, go to Android Manifest and rename the package manually. Then close Android Studio.

    • Go to your Android project in the explorer, then App --> src --> main --> java --> com. Here, rename the folder companyname to your new companyname.

    • Open this folder, and rename the gamename folder to your gamename, in the same format and spelling as you did in Project Structure. Now open Android Studio again.

    • Go to App --> java --> com --> companyname.gamename (this should be showing as the name you gave it in the explorer). Open PTPlayer and manually update the package name to the new package name.

    • This should resolve your problem of Cannot REsolve R

提交回复
热议问题