Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 android version of this application, i copied signed version of APK file on my device and install it - when i'm trying to launch it then i receiving message "Unfortunately, FirstProject has stopped". Debug version of this application working fine. I've spent almost a week trying to run this, and i didn't find any solution. Do any one have any idea what i'm doing wrong?

Regards

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
135 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...