如何解决如何在 Chromebook 上测试/查看我的 React Native 应用程序?
我正在尝试在我的主计算机上开发的 chromebook 上运行我的 react native expo 应用程序(请不要问任何问题。)。就像在手机上一样,我下载了 Expo Go,然后在 npm start
后扫描了二维码。但是在js完成捆绑后,应用刚刚关闭。我再次尝试,然后尝试将连接切换到隧道,然后再次尝试,但没有任何效果。有人可以帮忙吗?我的 App.js,虽然我认为不会有用:
import React from 'react'
import {
StyleSheet,View,StatusBar,imagebackground,Image,Text,Dimensions,} from 'react-native'
export default function App() {
console.log(Dimensions.window)
return (
<imagebackground
source={require('./assets/background.jpg')}
style={styles.background}
>
<Image
source={require('./assets/logo-red.png')}
style={styles.logo}
/>
<Text>Text that you don't need</Text>
<View style={styles.tomatoView} />
<View style={styles.blueView} />
</imagebackground>
)
}
const styles = StyleSheet.create({
background: {
flex: 1,alignItems: 'center',},logo: {
height: 100,width: 100,marginTop: '50px',tomatoView: {
backgroundColor: 'tomato',width: '100%',height: '50px',bottom: '50px',blueView: {
backgroundColor: 'dodgerblue',bottom: '0px',})
PS:在我尝试使用 chromebook 之前,我在我的网络浏览器中验证了该应用程序是否有效。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。