【问题标题】:React Native Webview: Browser not supportedReact Native Webview:不支持浏览器
【发布时间】:2019-11-13 01:32:18
【问题描述】:

我正在使用 react-native-webview,当我尝试添加此 URL (https://maps.flydenver.com/) 时收到此错误:

有没有办法解决这个问题?

import { WebView } from 'react-native-webview';

  render() {
    return (
        <View style={styles.container}>
        <StatusBar
            backgroundColor='#F1F1F1'
            barStyle='dark-content'/>
            <WebView
                source={{uri: 'https://maps.flydenver.com/'}}
                scalesPageToFit = {false}
                javaScriptEnabled={true}
                domStorageEnabled={true}
                renderLoading={this.ActivityIndicatorLoadingView}
                startInLoadingState={true}
                style={{ flex: 1 }}

                />
        </View>
    );
  }

【问题讨论】:

    标签: react-native react-native-android react-native-webview


    【解决方案1】:

    我认为是版本问题。

    npm i --save react-native-webview@7.5.0

    import { WebView } from 'react-native-webview';
    
    <WebView
      source={{ uri: 'www.google.com'}}
    />

    【讨论】:

      猜你喜欢
      • 2019-05-26
      • 2018-06-11
      • 2020-04-28
      • 1970-01-01
      • 2012-05-22
      • 1970-01-01
      • 2019-07-06
      • 2012-02-09
      • 2018-03-27
      相关资源
      最近更新 更多