android - 在 android 的 react-native 发布版本中禁用缩小和 uglify

标签 android react-native realm

我在开发环境 react-native 应用程序中正常工作。我想测试它的性能并发布了一个版本,但在发布后崩溃了。

01-09 20:16:13.644 23215 23251 E ReactNativeJS: Object type 't' not found in schema.

01-09 20:16:13.648 23215 23251 E ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication)

由于来源的缩小和丑化,我无法确定崩溃的原因。你能帮我禁用它吗,因为我已经花了很多时间在它上面。

react-native 版本:0.49.5

最佳答案

在 android/app/build.gradle 的 extraPackagerArgs 中设置 --minify=false 应该可以完成这项工作。

project.ext.react = [
    entryFile: "index.js",
    extraPackagerArgs: [ '--minify=false' ],
];

关于android - 在 android 的 react-native 发布版本中禁用缩小和 uglify,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48184447/

相关文章:

android - 我将 TextView 用作按钮,但它无法执行其操作。按下按钮后应用程序总是崩溃

Android Gradle Build Plugin 4.0.0 & R8 Desugaring 不适用于 API 19

react-native - 在没有 Chrome 调试的情况下 React Native Android 性能下降

react-native - react native : how to import flexbox styles from another file js?

swift - 让 Realm 和 Unbox 玩得更好

android - Android map 的奇怪行为

android - com.android.volley.NoConnectionError : javax.net.ssl.SSLException : Connection closed by peer on 4. 4.4 设备(适用于 7.0.1)

reactjs - Redux-persist迁移不迁移

swift - 在后台线程上查询 Realm 并在 UI 线程上解析 ThreadSafeReference 有什么意义吗?

ios - 当用户添加新联系人时更新应用程序核心数据/Realm