0

I generated the key and added the following settings

android {
...
signingConfigs {
    release {
        if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
            storeFile file(MYAPP_UPLOAD_STORE_FILE)
            storePassword MYAPP_UPLOAD_STORE_PASSWORD
            keyAlias MYAPP_UPLOAD_KEY_ALIAS
            keyPassword MYAPP_UPLOAD_KEY_PASSWORD
        }
    }
}

buildTypes {
    release {
        signingConfig signingConfigs.release
        minifyEnabled enableProguardInReleaseBuilds
        proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
    }
}

Then I generate the output

cd android && ./gradlew bundleRelease

But when I upload the application to the Google Play Market and install it on the phone, it starts and immediately closes. And in the logs it says that Metro is not running.

I also tried running the app with the command

npx react-native run-android --variant=release

But the error is the same. Has anyone experienced this? There is no such error on iPhone

Diefair
  • 153
  • 1
  • 10

1 Answers1

0

Try this method

$ cd your-app-folder
$ cd android && ./gradlew assembleRelease
JSONCMD
  • 79
  • 3