javascript - 出现未处理的错误 : 19. 0.0 不是有效的 SDK 版本

标签 javascript reactjs react-native expo

我在使用 react-native 执行应用程序时遇到问题:

我正在使用 create-react-native-app 创建我的应用程序,在执行 npm start 命令并在 expo 中打开应用程序后出现此错误 在我的智能手机上。

错误:

There was an unhandled error: 19.0.0 is not a valid SDK version. Options are 18.0.0, 17.0.0, 16.0.0, 15.0.0, 14.0.0, 13.0.0, 12.0.0, 11.0.0, UNVERSIONED.

package.json :

{
  "name": "app3",
  "version": "0.0.0",
  "description": "Hello Expo!",
  "author": null,
  "private": true,
  "main": "node_modules/expo/AppEntry.js",
  "dependencies": {
    "expo": "^19.0.0",
    "react": "16.0.0-alpha.12",
    "react-native": "https://github.com/expo/react-native/archive/sdk-19.0.0.tar.gz"
  }
}

最佳答案

改用 Expo SDK。我很久以前就换了,到目前为止,我不后悔。

您可以从这里下载:

https://expo.io/tools

从那里你可以毫不费力地创建新项目,我从来没有收到过这样的警告。

编辑:

此问题几乎没有结果,但正如 https://github.com/FormidableLabs/victory-native/issues/70#issuecomment-297657645 中所述

If i modify app.json and use 15.0.0 it works to run npm start. Then (and this is where it gets strange) I can kill the process, change it back to 16.0.0, and restart it - and it works. I've had these exact steps happen to me on two fresh CRNA projects.

您的下一个选择是在您的设备/模拟器中卸载并重新安装 expo APP。

关于javascript - 出现未处理的错误 : 19. 0.0 不是有效的 SDK 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45612297/

相关文章:

javascript - Cordova + Angular + PushPlugin - 未触发回调

javascript - 删除 Javascript 警报行会阻止我的 append 代码正常工作

javascript - 如何在每个 Relay.js 网络请求上添加加载指示器

reactjs - 无法更改 native 基本选项卡的高度

reactjs - React Native 需要点击两次 onPress 才能工作

javascript - 无法在 React Native 中显示数组

javascript - 如何在node.js中同步运行这个函数

javascript - 为什么变量大于循环内所有可能的值?

javascript - React 单独的实例使用单独的值调用相同的方法

javascript - 如果我需要从 API 获取组件的属性,我应该在组件加载之前执行此操作吗?