react-native - 27.0.0 不是有效的 SDK 版本。选项是 31.0.0、32.0.0、33.0.0 未版本化
问题描述
我无法使用 expo android 应用程序运行我的应用程序。我的设备在 Android Pie (8) 上运行。
世博安卓app版本:2.11.10
我尝试在另一台设备上运行应用程序但有同样的问题
错误屏幕 27.0.0 不是有效的 SDK 版本。选项是 31.0.0、32.0.0、33.0.0 未版本化
我的 package.json 如下所示:
{
"name": "project",
"version": "0.1.0",
"private": true,
"devDependencies": {
"@types/jest": "^23.1.0",
"@types/react": "^16.4.1",
"@types/react-dom": "^16.0.6",
"@types/react-native": "^0.55.21",
"@types/react-navigation": "^2.0.5",
"@types/react-redux": "^6.0.2",
"@types/react-test-renderer": "^16.0.1",
"jest-expo": "~27.0.0",
"react-native-scripts": "1.14.0",
"react-native-typescript-transformer": "^1.2.10",
"react-test-renderer": "16.3.1",
"tslib": "^1.9.2",
"typescript": "^2.9.2"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@types/expo": "^27.0.3",
"@types/lodash": "^4.14.116",
"axios": "^0.18.0",
"expo": "^27.0.1",
"lodash": "^4.17.11",
"native-base": "^2.5.2",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz",
"react-native-animatable": "^1.3.0",
"react-native-maps": "^0.21.0",
"react-native-navigation": "^1.1.486",
"react-native-router-flux": "^4.0.0-beta.31",
"react-native-swipe-gestures": "^1.0.2",
"react-navigation": "^2.7.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-saga": "^0.16.0"
}
}
app.json 看起来像:
{
"expo": {
"name": "Tream",
"slug": "Tream",
"version": "1.0.0",
"orientation": "portrait",
"sdkVersion": "27.0.0",
"icon": "./src/assets/icon.png",
"splash": {
"image": "./src/assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"android": {
"package": "com.treamcompany.tream"
},
"packagerOpts": {
"sourceExts": ["ts", "tsx"],
"transformer": "node_modules/react-native-typescript-transformer/index.js"
}
}
}
解决方案
您需要更新您的博览会版本:
- npm install(用于节点模块)
- 世博会更新
- npm install react-native-gesture-handler --save
- npm 开始
我有同样的问题,但我运行上面的命令并得到了输出
推荐阅读
- javascript - 是否仅对提交按钮更正了我的 ajax 调用和 jQuery PHP?
- javascript - 一旦用户使用 React 拒绝位置共享,如何激活用户位置共享?
- python - TensorFlow 优化器是否在带有分配的图中学习梯度?
- encryption - Kotlin 原生运行 JavaScript
- amazon-web-services - 在 aws 控制台中哪里可以找到 aws_iam_instance_profile?
- typo3 - 新闻记录的后端访问权限
- javascript - 如何制作小数点javascript?
- python-3.x - 获取 ProcedureCallFailed:调用过程失败:原因:org.neo4j.cypher.internal.v3_5.util.SyntaxException:
- android - 缩放动画不会改变 ImageView 的大小
- typescript - 如何使脚本在量角器中执行下一个它之前等待给定的时间跨度