react-native - 如何修改app.json文件并更改博览会小吃的sdkVersion?

标签 react-native expo

我的问题是我的部分代码在我的零食中不起作用。但是当将相同的代码复制到另一个小吃中时,它会起作用。当我下载这两个项目的代码时,唯一的区别似乎是在 app.json 文件中指定的 sdkVersion 。 (我的小吃使用 "sdkVersion": "32.0.0" 而代码工作的小吃使用 "sdkVersion": "26.0.0"

当我浏览到小吃链接时,app.json 文件不可见。看来只有导出文件后才能访问。现在我知道我可以使用更改后的版本在本地运行该应用程序,但我想继续在零食在线环境中工作。有没有办法解决这个问题?

谢谢:)

最佳答案

最简单的解决方案是更改您创建的点心中的 Expo 版本。

在网络浏览器的右下角,您可以看到一个带有 Expo v32.0.0 的菜单

enter image description here

单击该菜单会弹出一个列表,您可以在其中选择零食支持的不同版本的 Expo:

enter image description here

我会考虑尝试找出代码无法在 v32.0.0 上运行的原因,因为在某些时候 v26.0.0 将不再被支持作为零食.

来自世博会官方博客,https://blog.expo.io/expo-sdk-v32-0-0-is-now-available-6b78f92a6c52 ,他们计划在发布 SDK 33 时放弃对 SDK 26 的支持。这意味着本地开发和作为零食可能会变得困难。

Dropping SDK 25, will drop SDK 26 next release We routinely drop SDK versions that have low usage in order to reduce the number of versions that we need to support. This release sees the end of life for SDK 25. As usual, your standalone apps built with SDK 25 will continue to work; however, SDK 25 projects will no longer work within the latest version of Expo Client. If you want to re-run expo build, then you’ll need to upgrade from SDK 25, preferably to SDK 32 so you won’t need to update again for a while (and also because each Expo version is better than the last!).

关于react-native - 如何修改app.json文件并更改博览会小吃的sdkVersion?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54567830/

相关文章:

javascript - 在 React native 移动应用程序中集成 firestore 时获取 'firestore/permission-denied'

android - App Center 没有显示 React Native Android 的构建变体

javascript - 如何使用 React refs、回调模式来更新状态

react-native - React Native 应用程序无法在 Expo 应用程序中启动

react-native - Expo.js : Capture event when my app goes into the background?

android - React Native 卡在 'Resolve dependencies'

ios - 如何修复 Xcode 中的错误 React Native 'UMCore' 构建错误

javascript - 为什么在 App.js 中未定义 React Native App.js 导航?

ios - 使用 Expo 构建二进制文件是否会压缩应用程序的大小?

javascript - 无法解析模块 expo-constants