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:
何がうまくいかないのか誰でも助けてくれますか?