构建配置:
enableProguardInReleaseBuilds=true
cd android && ./gradlew installRelease
最佳答案
因为你需要配置proguard.. 查看RN官方文档here.
Proguard is a tool that can slightly reduce the size of the APK. It does this by stripping parts of the React Native Java bytecode (and its dependencies) that your app is not using.
IMPORTANT: Make sure to thoroughly test your app if you've enabled Proguard. Proguard often requires configuration specific to each native library you're using. See app/proguard-rules.pro.
关于启用 Proguard 后的 React-Native 应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36394807/