[英]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.