我在使用 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://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/