Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "Unresolved reference: _root_ide_package_" after changing the package name

When I changed my package name and rebuilt the project, Android Studio put before many class names this string _root_ide_package_.com.example.<myprojectname>. And I have this error Unresolved reference: _root_ide_package_. Any ideas how to fix it?

like image 428
MaxB Avatar asked Sep 17 '25 08:09

MaxB


2 Answers

While posting a code example would help, I had a similar issue and resolved it by doing a Replace in Path across the source tree and replaced all instances of _root_ide_package_.com.example.<myprojectname>. with nothing.

like image 64
Bink Avatar answered Sep 19 '25 14:09

Bink


Just remove anything before the class name, for example:

_root_ide_package_.com.<project_name>.APP

Remove _root_ide_package_.com.<project_name>.

like image 41
Lucas Rufino Avatar answered Sep 19 '25 14:09

Lucas Rufino