Javascript React native(expo)web视图错误网络::错误\u缓存\u未命中

Javascript React native(expo)web视图错误网络::错误\u缓存\u未命中,javascript,reactjs,react-native,webview,expo,Javascript,Reactjs,React Native,Webview,Expo,我正在使用react native(expo)并尝试使用web视图 我在控制台中收到了这个警告,但在手机屏幕上没有看到任何东西 “sdkVersion”:“36.0.0” “世博会”:“~36.0.0” “反应本机”:“ “react native webview”:“^8.0.2” 错误: 加载页面、对象时遇到错误{ “canGoBack”:假, “canGoForward”:假, “代码”:-1, “说明”:“网络::缓存出错”, “加载”:错误, “目标”:2665, “名称”:“名称”,

我正在使用react native(expo)并尝试使用web视图 我在控制台中收到了这个警告,但在手机屏幕上没有看到任何东西

“sdkVersion”:“36.0.0”

“世博会”:“~36.0.0”

“反应本机”:“

“react native webview”:“^8.0.2”

错误:

加载页面、对象时遇到错误{ “canGoBack”:假, “canGoForward”:假, “代码”:-1, “说明”:“网络::缓存出错”, “加载”:错误, “目标”:2665, “名称”:“名称”, “url”:“, } -console.warn中的节点\u modules\react native\Libraries\YellowBox\YellowBox.js:71:8 -警告中的节点\u modules\expo\build\environment\muteWarnings.fx.js:18:23 *在线加载错误 -invokeGuardedCallbackImpl中的节点\u modules\react native\Libraries\Renderer\implements\reactations\reactationverender-dev.js:307:15 -invokeGuardedCallback中的节点\u modules\react native\Libraries\Renderer\implementations\reactations\reactationverender-dev.js:531:36 -invokeGuardedCallbackAndCatchFirstError中的节点\u modules\react native\Libraries\Renderer\implementations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\rea -executeDispatch中的节点\u modules\react native\Libraries\Renderer\implementations\reactationverender-dev.js:722:42 *在线加载错误 -invokeGuardedCallbackImpl中的节点\u modules\react native\Libraries\Renderer\implements\reactations\reactationverender-dev.js:307:15 -invokeGuardedCallback中的节点\u modules\react native\Libraries\Renderer\implementations\reactations\reactationverender-dev.js:531:36 -invokeGuardedCallbackAndCatchFirstError中的节点\u modules\react native\Libraries\Renderer\implementations\reactations\reactations\reactations\reactations\reactationverender-dev.js:555:30 -executeDispatch中的节点\u modules\react native\Libraries\Renderer\implementations\reactationverender-dev.js:722:42 -ExecuteDispatchesInoder中的节点\u modules\react native\Libraries\Renderer\implementations\reactations\reactationverender-dev.js:744:20 -executeDispatchesAndRelease中的节点\u modules\react native\Libraries\Renderer\implementations\reactations\reactationverender-dev.js:907:29 -ForEachManager中的节点\u modules\react native\Libraries\Renderer\implementations\react nativerenderer-dev.js:889:12 -runEventsInBatch中的节点\u modules\react native\Libraries\Renderer\implementations\react nativerenderer-dev.js:932:21 -runExtractedPluginEventsInBatch中的节点\u modules\react native\Libraries\Renderer\implementations\react native verender-dev.js:1096:19 -BatchedUpdate$argument\0中的节点\u modules\react native\Libraries\Renderer\implementations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\rea -BatchedUpdate$1中的节点\u modules\react native\Libraries\Renderer\implementations\react nativerenderer-dev.js:18791:14 -BatchedUpdate中的节点\u modules\react native\Libraries\Renderer\implementations\react nativerenderer-dev.js:2709:30 -BatchedUpdate$argument\0中的节点\u modules\react native\Libraries\Renderer\implementations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\reactations\rea -receiveEvent中的节点\u modules\react native\Libraries\Renderer\implementations\reactiveverender-dev.js:2814:26 -调用函数中的节点\u modules\react native\Libraries\BatchedBridge\MessageQueue.js:436:47 -节点\u modules\react native\Libraries\BatchedBridge\MessageQueue.js:111:26在\uuuuu-guard$argument\u 0中 -保护中的节点\u模块\react native\Libraries\BatchedBridge\MessageQueue.js:384:10 -节点\u modules\react native\Libraries\BatchedBridge\MessageQueue.js:110:17位于\uuuu-guard$argument\u 0中 *[本机代码]:callFunctionReturnFlushedQueue中为null


我假设这种情况发生在你的旧安卓设备上?较新的安卓设备不应该有这个问题,世博会正在进行修复,但目前还没有确定的时间表。最好的建议是在iOS设备、emulator上开发或构建APK,您应该能够在旧设备上加载它而不会出现问题

“看起来这是安卓系统的上游问题,在androidx中得到了解决。appcompat:appcompat:1.2.0,目前我们仍然使用1.1.0

由于1.2.0仍处于alpha版本,因此最好等待它成为一个稳定的版本。”

从4月16日开始,1.2.0似乎已经发布了,但世博会还没有发布消息

注意:我在运行安卓5.1.1棒棒糖的三星Galaxy Tab 4上遇到了同样的问题。这是使用隧道、LAN或本地连接模式发生的

一位用户确认“WebView Android版本5.0不工作(Android版本8-10没有任何问题)”

如果这些回购协议中的任何一个能够解决这个问题,我将更新这个答案


正如您在本演示中所看到的,它在Android emulator上确实有效:

我面临着同样的问题,我对React-Native非常陌生,唯一对我有效的解决方案是将代码插入React-Native cli。自去年10月以来,世博会可能需要更多的时间来解决这个问题。