我使用 Expo XDE 创建了一个项目。我检查了这个无法加载 expo 应用程序:出了点问题,但我已经启用了“绘制其他应用程序”。当我扫描此 QR 码时它可以工作https://expo.io/@ajaysaini/first-proj但当我在 XDE 的 android 设备上运行它时它不会。
main.js
import Expo from 'expo';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Updating!</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Expo.registerRootComponent(App);
当我在设备上运行它时,它在 android 设备上显示以下错误。我多次尝试在 XDE 中重新启动,但对我没有帮助。
Dependency graph loaded.
11:19:21 AM
Starting React Native packager...
11:19:24 AM
Scanning 528 folders for symlinks in D:\Expo\first-proj\first-proj\node_modules (18ms)
11:19:24 AM
Loading dependency graph.
11:19:24 AM
Running packager on port 19001.
11:19:25 AM
11:19:33 AM
Project opened! You can now use the "Share" or "Device" buttons to view your project.
11:19:44 AM
Opening on Android device
11:19:54 AM
Dependency graph loaded.
11:21:41 AM
Opening on Android device
11:23:31 AM
Opening on Android device
错误:
There was an unhandled error: Could not load exp://
Stack Trace:
谁能帮我出了什么问题?