B. Mohammad
B. Mohammad

Reputation: 2464

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

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:

enter image description here

Upvotes: 1

Views: 569

Answers (1)

Yan Brito
Yan Brito

Reputation: 43

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

Upvotes: 1

Related Questions