【发布时间】:2017-05-22 20:21:18
【问题描述】:
内容确实在模拟器中完美显示并使用真实设备进行调试,但在使用真实设备进行测试时没有显示任何内容(使用已发布的 .apk)。它只显示白色的空白容器。还是我错过了什么?
<WebView
ref={(wView) => {this.wView = wView}}
javaScriptEnabled={true}
// onBridgeMessage={this.onBridgeMessage}
onMessage={this.onMessage}
injectedJavaScript="window.postMessage = String(Object.hasOwnProperty).replace('hasOwnProperty', 'postMessage');"
automaticallyAdjustContentInsets={false}
domStorageEnabled={true}
startInLoadingState={true}
source={mainHtml} <-- load with, var mainHtml = require('./MainHtml.html');
style={{width: 320,height:100,flex: 1}}/>
环境
react-native-cli: 2.0.1
反应原生:0.43.4
反应:16.0.0-alpha.6
设备(华硕 Zenfone)
Android 版本 6.0.1
【问题讨论】:
标签: android webview react-native