问题描述
我正在尝试在我的主计算机上开发的 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 (将#修改为@)