React native android application has stopped

后端 未结 2 1225
你的背包
你的背包 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条回答
  •  旧时难觅i
    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.

提交回复
热议问题