“Cannot find symbol R” error after renaming package name

后端 未结 8 2419
深忆病人
深忆病人 2021-02-07 05:06

After renaming my project package name (with Refactor), I got this error:

Error:(7, 44) error: cannot find symbol class R

All of my R

8条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-07 05:24

    You have to first close android studio. Then

    1. Delete "build" folder
    2. open the commandline and type gradlew clean
    3. Then type gradlew assembledebug
    4. If the build succeeds, feel free to go back to android studio

提交回复
热议问题