“Cannot find symbol R” error after renaming package name

后端 未结 8 2377
深忆病人
深忆病人 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:35

    Try the following :

    Try deleting your R.java file , android studio will regenerate it.

    Clean Project

    Rebuild Project

    And check:

    Check the AndroidManifest.xml, there's a package attribute on the top-level element

    (Well it depends on how you renamed your package name)

提交回复
热议问题