1

I have an issue with react native release APK.

The app run on debug mode but it crash immediately on release mode

Some Phone it will be installed but when i will run it then it crash immediately and some other phone it will not installed Here is my app like looking this... enter image description here

Here is my packege dependencies list

"dependencies": {
    "axios": "^0.18.0",
    "jwt-decode": "^2.2.0",
    "native-base": "^2.12.1",
    "react": "16.8.3",
    "react-native": "0.59.8",
    "react-native-awesome-alerts": "^1.2.0",
    "react-native-elements": "^1.1.0",
    "react-native-gesture-handler": "^1.2.1",
    "react-native-maps": "^0.24.2",
    "react-native-otp-inputs": "^3.0.2",
    "react-native-swiper": "^1.5.14",
    "react-native-vector-icons": "^6.4.2",
    "react-navigation": "^3.9.2",
    "react-redux": "^5.0.7",
    "redux": "^3.7.2",
    "redux-thunk": "^2.2.0"
},

And my android/build.gradle file is -

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
        multiDexEnabled = true
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'
    }
}

My android studio log cat crash .... enter image description here

Kazi Rahamatullah
  • 361
  • 1
  • 4
  • 17

2 Answers2

0

based on your crash log, and the fact that app runs in debug it is very likely that you have bundling problem. Run this command again in order to create a fresh new bundle

react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

or

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

if you don't have index.android.js, and create a new release

DNA.h
  • 823
  • 8
  • 17
0

I had the same error, change react-native to 0.59.3

run

yarn add react-native@0.59.3

or

npm i --save react-native@0.59.3

I also removed both android/app/build and node_modules/ (To make a fresh build)

Apparently it's a bug associated with version 0.59.8

Yhozen
  • 1,248
  • 1
  • 9
  • 8