0
誰能告訴我,爲什麼即時得到這個錯誤:反應,原生的Android錯誤404
我的代碼是:
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TextInput,
Image,
LinkingIOS,
Navigator,
WebView
} from 'react-native';
export default class ReactNativeReactWebview extends Component {
render() {
return (
<WebView
source={require('./index.html')}
javaScriptEnabled={true}
/>
);
}
}
AppRegistry.registerComponent('reactAndroid',()=>ReactNativeReactWebview);
我的應用程序運行在模擬器不錯,但在命令行中得到錯誤....在這種PIC錯誤:
我沒有在我的項目文件中的favicon.ico路徑! –
這就是你得到錯誤的原因。瀏覽器嘗試獲取圖標並失敗,因此打包程序返回「未找到文件」(404)。但是這不會以任何方式影響您的WebView,因此將它保留原樣是安全的。 – martinarroyo
thnx you alot @martinarroyo :) –