本文介绍了无法加载exp://出问题了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Expo XDE创建了一个项目.我检查了此无法加载expo应用程序:出了点问题,但是我已经启用了在其他应用程序上绘图".当我扫描此文件时,它可以 https://expo.io/@ajaysaini/first-proj QR代码,但是当我在XDE的android设备上运行它时却没有.

I have created a project using Expo XDE. I checked this Can't load expo app: Something went wrong but I have already enabled "Draw over other apps". It works https://expo.io/@ajaysaini/first-proj when I scan this QR code but it doesn't when I run it on android device from XDE.

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中重新启动,但对我没有帮助.

When I am running it on device it shows below error on android device. I tried restart in XDE multiple times but it didn't help me.

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:

任何人都可以帮我解决问题吗?

Can anyone help me what is going wrong ?

推荐答案

您最好打开XDE Client并启用开发模式.然后,点击灰色齿轮以创建 Host> LAN (局域网-意味着通过WiFi与实际设备共享软件包).

You better open XDE Client and enable development mode. Then, click on the gray cog to make Host > LAN (Local area network - which means sharing packages over WiFi with a real device).

Localhost选项也可以使用,但是根据 Expo Debugging文档:

Localhost option may work as well but according to Expo Debugging docs:

此外,这是我几个月前写的一个直观的,有启发性的答案,该答案也可能会有所帮助:

Also, here is a visual informative answer that I wrote a few months ago that may also help: How do I run an app on a real iOS device using Expo?

这篇关于无法加载exp://出问题了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 09:00