Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Error: Cannot resolve symbol 'PackageList'

Cannot resolve symbol 'PackageList'

I am getting this error once I open the android folder in my newly generated react-native project.

The steps to recreate it for me is to make the expo project: expo init my-app

Then eject the project: Expo eject

And then I go into the android folder and open android\app\src\main\java\Android\Screen\MainActivity.java

and I get the bug.

any help would be much appreciated.Image of error in the android studio

like image 406
Tias Avatar asked Jul 15 '26 23:07

Tias


1 Answers

You need to do a gradle sync (and build) first - the build will fail, but create PackageList for you (in e.g. android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java

Similarly, it creates a BuildConfig.java

like image 87
Rich Avatar answered Jul 17 '26 16:07

Rich