react-native ios webview文件uri

时间:2017-10-09 19:02:19

标签: javascript ios react-native webview

如何在react-native webview中使用javascript引用打开本地html文件?

我添加了我的文件" test.html"进入根目录然后我引用为

<WebView source={{uri:"file:///test.html"}}
        style={styles.webview} />

但它会产生以下错误:

Domain:NSUrlErrorDomain 
Error: -1100
Description: the requested URL was not found on this server

如何在IOS的本地webview中包含带有Javascript的静态html文件?

0 个答案:

没有答案