问题描述
我使用链接 https://reactnative.dev/docs/发布了.apk文件. signature-apk-android ,然后将其安装在我的android设备上.当我打开它时,它立即崩溃.
I published my .apk file using the link https://reactnative.dev/docs/signed-apk-android and I installed it on my android device. When I open it, it immediately crashes.
任何人都可以帮忙吗?
推荐答案
看来,发生这种情况的原因可能很多.但是仍然分享解决我崩溃的原因.
It seems there might be many reasons of this happening. But still sharing what solved my crash.
我已经在我的发行版APK中启用了proguard,但我只是将其禁用了.
I had enabled proguard in my release apk, I just disabled it.
在[project-root]/android/app/build.gradle
文件中,
我从def enableProguardInReleaseBuilds = true
到def enableProguardInReleaseBuilds = false
.
希望它可以帮助其他人解决这个烦人的问题.
Hope it helps others to solve this annoying issue.
这篇关于React Native App在打开后保持关闭而不会崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!