React native android application has stopped

后端 未结 2 1220
你的背包
你的背包 2020-12-07 00:54

I\'ve stuck with an android version of an application (this one with \"Welcome to React Native!\" text). After this, I did exact steps as a documentation says. After build a

相关标签:
2条回答
  • 2020-12-07 01:40

    I think the problem lies here. In the latest releases, pro guard is enabled by default. Try disabling it in android/app/build.gradle :

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

    Change this :

    def enableProguardInReleaseBuilds = true 
    

    to this :

    def enableProguardInReleaseBuilds = false 
    

    Then run the steps again to create you APK.

    0 讨论(0)
  • 2020-12-07 01:42

    Well, that's really not a lot of info to use.. but, if the difference is just debug ou signed, I would search for obfuscation problems in the signed version.

    But this is just a wild guess. If you want to really get help you need to put the stack error here, as well as more info of the part of the code that crashes.

    0 讨论(0)
提交回复
热议问题