让我告诉你,我完全是新的反应原生,事实上这是我建立的第一个应用程序。我正在因这个恼人的错误而死。每当我向项目添加任何图像时,都会出现此错误。我正在使用的语法是
import React, { Component } from 'react';
import {
StyleSheet,
Image,
Text,
View
} from 'react-native';
export default class Login extends Component {
render() {
return (
<View style={styles.container}>
<View style={styles.splashlogo}>
<Image
source={require('../../images/splashscreenlogo.png')}
/>
<Text>
Modeloca
</Text>
</View>
</View>
);
}
}
但是收到此错误
com.facebook.react.common.JavascriptException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false' failed to load.
Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false' failed to load.
loadApplicationScript
WebsocketJavaScriptExecutor.java:173
run
NativeRunnable.java
handleCallback
Handler.java:739
dispatchMessage
Handler.java:95
dispatchMessage
MessageQueueThreadHandler.java:31
loop
Looper.java:135
run
MessageQueueThreadImpl.java:194
run
Thread.java:818
任何建议!