[英]Unable to debug/test my react-native app on expo
我是新手,使用世博會做出反應原生。 在打開expo應用程序並從http:// localhost:19002 /掃描QR碼時,我得到隧道連接,但在我的設備中始終有錯誤說明出錯或在http:// localhost:19002 /我得到錯誤日志為我們注意到你的隧道有問題。 這可能是由於我們的隧道提供商出現間歇性問題。 如果您無法連接到應用程序,請嘗試重新啟動項目,或將主機切換到LAN。
這是我試圖在我的移動設備中測試的代碼。
import React from "react";
import { StyleSheet, Text, View, Image } from "react-native";
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<View style={styles.header}>
<Text style={styles.title}> Cart </Text>
</View>
<Text style={styles.paragraph}>
Change code in the editor and watch it change on your phone! Save to
get a shareable url.
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
paddingTop: Constants.statusBarHeight,
backgroundColor: "#ecf0f1",
padding: 8
},
paragraph: {
margin: 24,
fontSize: 18,
fontWeight: "bold",
textAlign: "center"
},
header: {
display: "flex",
flex: 1,
height: "10px",
width: "100%",
backgroundColor: "#232323",
color: "white"
},
title: {
textAlign: "center",
margin: "0 auto",
textSize: "6px"
}
});
您的調試設備和計算機應連接到相同的WiFi
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.