React原生android应用程序已停止 [英] React native android application has stopped
问题描述
我坚持使用Android版本的应用程序(这个版本的欢迎使用React Native!文本)。在此之后,我按照文档说明做了一些确切的步骤。在构建此应用程序的Android版本后,我在我的设备上复制了APK文件的签名版本并安装它 - 当我尝试启动它然后我收到消息不幸的是,FirstProject已经停止。这个应用程序的调试版工作正常。我花了差不多一个星期试图运行它,我没有找到任何解决方案。有没有人知道我做错了什么?
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?
问候
推荐答案
我认为问题在于此处。
在最新版本中,默认情况下启用专业版保护。尝试在android / app / build.gradle中禁用它:
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"
}
}
更改此:
def enableProguardInReleaseBuilds = true
到此:
def enableProguardInReleaseBuilds = false
然后再次运行步骤为你创建APK。
Then run the steps again to create you APK.
这篇关于React原生android应用程序已停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!