【问题标题】:expo is out of date uninstall and run again to upgradeexpo 已过期卸载并再次运行以升级
【发布时间】:2019-06-12 13:33:10
【问题描述】:

在 ios 模拟器上运行我的应用程序时,我收到以下错误 This version of the Expo app is out of date. Uninstall the app and run again to upgrade.

这是我尝试升级 expo-cli 但未成功的方法

  1. npm update -g

  2. yarn add global expo-cli

  3. npm uninstall expo-cli
  4. npm cache clean --force
  5. yarn add global expo-cli

这里是 app.json

"expo": {
    "name": "firebase-reacte-native",
    "slug": "firebase-reacte-native",
    "privacy": "public",
    "sdkVersion": "32.0.0",
    "platforms": [
    ....

这里是 package.json

"dependencies": {
    "expo": "^32.0.0",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"
  }

我想要做的就是运行 ios-simulator 而不会在 ios 模拟器上显示错误消息 there was a problem loading the requested app. The experience you requested requires a newer version of the Expo Client app.

【问题讨论】:

    标签: javascript react-native expo


    【解决方案1】:

    问题在于 iOS 模拟器/设备上的应用程序已过期,并且与您运行的当前 Expo 版本不兼容。

    从 iOS 模拟器中删除 Expo 应用程序,它应该可以工作,或者如果您在设备上,请安装最新更新

    https://github.com/expo/expo/issues/1595

    一种方法是在模拟器打开的情况下发送至Erase All Content and Settings。然后重新运行 npm start,Expo App 将再次安装到这个设备模拟器上。

    【讨论】:

    • 这是在模拟器上 - 在实际的物理设备上做什么?
    • 正如我在回答 install the latest update if you are on a device 中提到的。因此,您可能应该从 App Store 下载最新版本。如果这不起作用并且您仍然有问题,那么您应该在他们的 Github 上打开 Expo 的问题。
    • 在 iOS 模拟器上,按照建议从模拟器中删除 expo 应用程序就像一个魅力!对于 Android 模拟器,我必须通过 Android Studio 擦除数据。我很高兴能重返赛场!谢谢!
    【解决方案2】:

    Homebrew 更新解决了我的问题!

    brew upgrade node

    【讨论】:

      【解决方案3】:

      请试试这个:

      1.- npm cache clean -f
      2.- yarn upgrade
      3.- npm upgrade
      3.- npm install
      

      如果这不起作用,请尝试编辑 package.json

      {
        "react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
        "expo": "^34.0.1",
        "react": "16.8.3"
      } 
      

      然后

      npm install
      

      让我知道这是否适合你

      【讨论】:

        【解决方案4】:

        Expo 似乎检测到过时的版本,并建议在您运行 expo start 时在控制台中为您更新它:

        › Opening exp://192.168.1.231:19000 on Pixel_3a_API_30_x86
        ✔ Expo Go on Pixel_3a_API_30_x86 (emulator) is outdated, would you like to upgrade? … yes
        Uninstalling Expo Go from Android device.
        

        我所要做的就是按Y,它会自动更新。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2015-04-06
          • 2018-04-29
          • 1970-01-01
          • 2011-11-15
          • 2020-03-07
          • 1970-01-01
          • 2014-12-11
          相关资源
          最近更新 更多