Pushwoosh / pushwoosh-react-native-plugin

Other
57 stars 43 forks source link

Android crash app when build release v6.1.7 #128

Closed tuantvk closed 2 years ago

tuantvk commented 2 years ago

i use react-native: 0.60.4 and pushwoosh-react-native-plugin: 6.1.7 app crash when open.

wfhm commented 2 years ago

@tuantvk

I could not reproduce it so far. However, it looks like, for some reason, plugin sources are obfuscated. Could you please share your build.gradle files?

tuantvk commented 2 years ago

@wfhm my build.gradle file

buildscript {
    ext {
        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30

        androidXCore = "1.0.2"
        supportLibVersion = "29.0.0"
        ndkVersion = "20.1.5948944"
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath('com.google.gms:google-services:4.3.3')
        classpath("com.android.tools.build:gradle:4.1.0")

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        jcenter()
    }
}

In debug mode everything fine, but i release app and open it, app crash with logs as above

wfhm commented 2 years ago

@tuantvk this is really strange. The plugin specifically disallows code obfuscation in release builds, and nothing in your build.gradle should override it. By any chance, can you share a simple reproducer project with us so we could test it on our side? Also, did you try updating to higher React Native versions?

tuantvk commented 2 years ago

@wfhm I don't know what is happening, but I upgraded react native to v0.64.2. It is work. Thanks!