5

My app works fine on my simulator so now I am trying to put it on my phone. When I try install I get the following message

...
BUILD SUCCESSFUL
Total time: 15.578 secs

This build could be faster, please consider using the Gradle Daemon: http://gradle.org/docs/2.4/userguide/gradle_daemon.html
Starting the app (/usr/local/opt/android-sdk/platform-tools/adb shell am start -n com.ethicalfishing/.MainActivity)...
Starting: Intent { cmp=com.ethicalfishing/.MainActivity }
Error type 3
Error: Activity class {com.ethicalfishing/com.ethicalfishing.MainActivity} does not exist.

I understand this error has been spoken about relating to non-react-native apps, however the solutions given were either not relevant or not helpful (or I didn't understand them)

ChrisF
  • 134,786
  • 31
  • 255
  • 325
Adam Katz
  • 6,999
  • 11
  • 42
  • 74
  • https://stackoverflow.com/questions/45061034/how-to-generate-androidmanifest-xml-from-a-react-native-app-created-with-react-n location of AndroidManifest.xml file – Abhilash.P.V Nov 20 '20 at 09:28

1 Answers1

9

I had the same problem. I found that build.gradle's applicationId and AndroidManifest.xml package were different.

build.gradle:

defaultConfig {
    applicationId "com.example.yourapp"
    minSdkVersion 16
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }

That was the problem in my case.

Jagadish Upadhyay
  • 1,236
  • 13
  • 22
YossiF
  • 111
  • 1
  • 5