我生成了运行gradlew assembleRelease的apk。
当我尝试执行apk时,出现以下错误: 2019-07-14 18:32:12.199 16842-16864 /? E / ReactNativeJS:Expo SDK需要运行Expo。似乎本地Expo模块不可用,并且此代码未在Expo上运行。访问https://docs.expo.io,以了解有关开发世博项目的更多信息。
2019-07-14 18:32:12.208 16842-16864/? E/ReactNativeJS: Module AppRegistry is not
a registered callable module (calling runApplication)
2019-07-14 18:32:12.225 16842-16865/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
Process: com.testapp, PID: 16842
com.facebook.react.common.JavascriptException: The Expo SDK requires Expo to run. It appears the native Expo modules are unavailable and this code is not running on Expo. Visit https://docs.expo.io to learn more about developing an Expo project., stack:
<unknown>@718:136
v@2:1489
d@2:949
o@2:435
<unknown>@717:5996
v@2:1489
d@2:949
o@2:435
<unknown>@716:241
v@2:1489
d@2:949
o@2:435
<unknown>@714:150
v@2:1489
d@2:949
o@2:435
<unknown>@691:154
v@2:1489
d@2:949
o@2:435
<unknown>@337:161
v@2:1489
d@2:949
o@2:435
<unknown>@335:229
v@2:1489
d@2:949
o@2:435
<unknown>@12:58
v@2:1489
d@2:879
o@2:435
global code@1715:4
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
在java.lang.Thread.run(Thread.java:764) 2019-07-14 18:32:12.230 1637-4992 /? W / ActivityManager:强制完成com.testapp / .MainActivity
活动此后,应用立即崩溃。
这是反应本机信息的结果: 反应本机环境信息: 系统: 作业系统:Windows 10 CPU:(8)x64 Intel(R)CoreTM i7-8550U CPU @ 1.80GHz 内存:3.67 GB / 15.89 GB 二进制文件: 纱线:1.13.0-C:\ Program Files(x86)\ Yarn \ bin \ yarn.CMD npm:6.9.0-C:\ Program Files \ nodejs \ npm.CMD IDE: Android Studio:版本3.3.0.0 AI-182.5107.16.33.5314842