'react-native' 'run-android' fails, but the app run successfully from Android studio

Viewed 364

The app runs from Android studio without any issue, but using react-native run-android I get this error message:

info JS server already running. info Installing the app... info Connecting to the development server... info Starting the app on "emulator-5554"... Starting: Intent { cmp=com.joinfilter.customer/.MainActivity } Error type 3 Error: Activity class {com.joinfilter.customer/com.joinfilter.customer.MainActivity} does not exist.

I checked the applicationId and its the same in all the places in the android project.

Another remarks/issues:

  • cd android && ./gradlew clean has no effect.
  • and I don't see the build folder inside android:

enter image description here

1 Answers

If you are using a different activity on your app launch, like a splash screen, you can try this:

react-native run-android --main-activity .ui.SplashScreenActivity

.ui.SplashScreenActivity is the activity path

Related