启用 Proguard 后的 React-Native 应用程序崩溃

标签 react-native

构建配置:

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/

相关文章:

javascript - 单击 FlatList 元素时如何打开带有项目信息的 Modal?

firebase - 使用 GeoFire 在 Firebase 中保存当前位置(React Native)

firebase - _firebase2.default.database.ref 不是函数

react-native - react-native 中的倒数计时器

android - React Native 构建失败 Could not HEAD/android-jsc/maven-metadata.xml'

android - react native 安卓 : How to change the color of ListView "end of scroll" animation?

react-native - React Native 适合使用 TensorFlow.js 构建的跨平台机器学习应用程序吗?

javascript - 在 React Native Picker 中仅渲染唯一标签

android - 我在第一次使用 react-native run-android 时遇到了困难。错误如下所示

xcode - 防止每次在 Xcode 中执行构建时运行 React Native 打包程序