Can't rename resource (layout) files (Android Studio 3.0 Beta 3 is installed)

后端 未结 4 1628
予麋鹿
予麋鹿 2021-02-11 18:52

Beta 3 doesn\'t allow to rename resource files such as layout files. It does show the renaming dialog, but when trying to apply changes it reads the following error message:

4条回答
  •  失恋的感觉
    2021-02-11 19:26

    I was able to work around it temporarily by moving my R.java file into my src directory. For example, if you're package name is com.example.sample, move your R.java file from app/build/generated/source/r/debug/com/example/sample/R.java to app/src/main/java/com/example/sample/R.java. Be sure to delete it when you're finished refactoring, it will be regenerated during the build process.

提交回复
热议问题