简体   繁体   English

Expo 尝试在真实手机上启动应用程序时卡在无休止的加载屏幕上

[英]Expo stuck on endless loading screen when trying to start app on real phone

I recently set up a new react native project, which I test on my phone using expo.我最近建立了一个新的 React Native 项目,我使用 expo 在我的手机上进行了测试。

It worked fine in the beginning, I could start the app on my phone without problems using the QR code from expo. However after some time it stopped working, when I now try to load the app on my phone with the qr code expo it stuck on an endless loading screen.一开始它运行良好,我可以使用 expo 中的二维码在我的手机上启动应用程序而没有问题。但是一段时间后它停止工作,当我现在尝试使用二维码 expo 在我的手机上加载应用程序时它卡住了在无尽的加载屏幕上。 I don't get any error messages and the app loads perfectly fine when I start it inside the browser, again without any error messages.我没有收到任何错误消息,当我在浏览器中启动它时,应用程序加载得非常好,同样没有任何错误消息。

I tried to delete the node_modules folder and reinstall it with yarn and npm, like it was recommended, but it still doesn't work.我尝试删除 node_modules 文件夹并使用 yarn 和 npm 重新安装它,就像推荐的那样,但它仍然不起作用。

I think it started after I installed some package, but even after I removed it it still didn't work:我认为它是在我安装了一些 package 之后启动的,但即使在我删除它之后它仍然无法正常工作:

my installed packages (from package-lock.json and package.json (the packages are exactly the same) ):我安装的包(来自 package-lock.json 和 package.json(包完全相同)):

    "@react-navigation/native": "^3.8.4",
    "expo": "~42.0.1",
    "expo-barcode-scanner": "~10.2.2",
    "expo-splash-screen": "~0.11.2",
    "expo-status-bar": "~1.0.4",
    "expo-updates": "~0.8.1",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "~0.63.4",
    "react-native-camera": "^4.0.0",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-reanimated": "~2.2.0",
    "react-native-screens": "~3.4.0",
    "react-native-unimodules": "~0.14.5",
    "react-native-web": "~0.13.12",
    "react-navigation": "^4.4.4",
    "react-navigation-stack": "^2.10.4"

I also removed the routing from App.js and replaced it with some basic code, but it still doesn't work:我还从 App.js 中删除了路由并用一些基本代码替换了它,但它仍然不起作用:

import React from 'react';
import { Text, View } from 'react-native';

const YourApp = () => {
  return (
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
      <Text>
        Try editing me! 🎉
      </Text>
    </View>
  );
}

export default YourApp;

In my case it was a.network problem I had to reset the router.就我而言,这是一个网络问题,我不得不重置路由器。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Expo react-native 应用程序在手机上调试时工作,但发布的 apk 在启动时崩溃 - Expo react-native app works when debugging on phone but released apk crashes on start 流星:Cordova Android应用程序停留在加载屏幕上 - Meteor: Cordova Android app stuck on loading screen 应用程序卡在 android 模拟器的加载屏幕上 - App is stuck on loading screen on android emulator Android App卡在了加载屏幕中-Android Studio - Android App is stuck in a loading screen - Android Studio 无法在真实设备上加载 expo 开发应用程序:加载项目时出现问题 - Cannot load expo dev app on real device: There was a problem loading the project 尝试使用 Apple Music 登录时,MusicKit 卡在加载屏幕上(用于媒体控制) - MusicKit gets stuck on the loading screen when trying to login with Apple Music (for media contols) Expo 应用程序在尝试使用按钮从一个屏幕导航到另一个屏幕时仅在 Android 崩溃 - Expo app crashes only in Android when trying to navigate from a screen to the other using a Button 尝试打开应用程序时出现白屏。 应用程序正在我的手机上启动而没有错误 - Getting white screen when trying to open the app. App is getting launched on my phone without errors 当手机屏幕锁定时,我的倒数计时器卡住了 - My Countdown Timer Stuck when phone screen is locked 在Android中,在第一次启动手机应用程序时,活动前白屏显示 - In android getting white screen before activity when first time app start on phone
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM