我在ios模拟器上启动expo时遇到此错误 .
The experience you requested uses Expo SDK v(null), but this copy of Expo Client requires at least v23.0.0. The author should update their experience to a newer Expo SDK version.
我已经看到了这个答案Expo not loading (React-Native) -- null Expo SDK version但解决方案对我不起作用 . 我的app.json中已经有了sdkVersion:
{ "expo": { "sdkVersion": "22.0.0" } }
我试过 yarn upgrade --latest
但仍然没有运气 . 任何想法都表示赞赏 . 我正在使用expo-cli --version 1.1.0
1 回答
答案是通过进行以下更改来更新SDK .
Close XDE or your exp CLI server In app.json, change sdkVersion to "27.0.0" In package.json, change these dependencies: - react-native to "https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz" - expo to "^27.0.0" - react to ("16.3.1" — this exact version) - react-navigation to "1.5.11" (if you use it, and be sure to peruse the release notes) - jest-expo to "^27.0.0" (if you use it) - sentry-expo did not change from "~1.7.0" (if you use it) Delete your project’s node_modules directory and run npm install again (or use Yarn, we love Yarn) Reopen your project in XDE and press “Restart” to clear the packager cache, or run exp start -c if you use use exp. Update the Expo app on your phones from the App Store / Google Play. XDE and exp will automatically update your apps in simulators.
https://blog.expo.io/expo-sdk-v27-0-0-is-now-available-898bf1e5b0e4