问题描述
React Native 发布版本无法启动.下面是 logcat 消息
React Native release build fails to start. Below is the logcat message
ReactNativeJS:找不到变量:runInContext
03-09 18:45:53.178 20609 20633 E ReactNativeJS:模块 AppRegistry 不是已注册的可调用模块(调用 runApplication)
03-09 18:45:53.178 20609 20633 E ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication)
03-09 18:45:53.195 20609 20634 E AndroidRuntime:致命异常:mqt_native_modules
03-09 18:45:53.195 20609 20634 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
03-09 18:45:53.195 20609 20634 E AndroidRuntime:进程:com.myapp,PID:20609
03-09 18:45:53.195 20609 20634 E AndroidRuntime: Process: com.myapp, PID: 20609
03-09 18:45:53.195 20609 20634 E AndroidRuntime:com.facebook.react.common.JavascriptException:找不到变量:runInContext,堆栈:
03-09 18:45:53.195 20609 20634 E AndroidRuntime: com.facebook.react.common.JavascriptException: Can't find variable: runInContext, stack:
还有一些其他错误,例如
There are few other errors like
03-09 18:45:52.618 20609 20621 W 未知:ViewManagerPropertyUpdater:找不到为 com.facebook.react.views.view.ReactViewManager 类生成的 setter03-09 18:45:52.622 20609 20621 W 未知:ViewManagerPropertyUpdater:找不到为 com.facebook.react.views.viewpager.ReactViewPagerManager 类生成的 setter03-09 18:45:52.625 20609 20621 W 未知:ViewManagerPropertyUpdater:找不到为 com.facebook.react.views.text.ReactVirtualTextViewManager 类生成的设置器
调试版本运行正常.
推荐答案
尝试升级到 [email protected]
.
这里有完整的细节:https://github.com/facebook/react-native/issues/12772
这篇关于React Native 发布无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!