iOS模拟器的部署目标设置为7.0,但该平台支持的部署目标版本范围为8.0至12.1。

354

我在Xcode 10.1中收到以下警告信息:

iOS模拟器部署目标设置为7.0,但此平台支持的部署目标版本范围为8.0到12.1。

我的模拟器系统为12.1, Xcode 10.1, 并已更新pod文件。

输入图像说明

我的部署目标为9.0

输入图像说明

在我的目标中

输入图像说明


请在 https://user-images.githubusercontent.com/5786033/45890297-f23a1d00-bdc2-11e8-885c-039432d8fbc2.png 中验证目标,请注意:该操作在框架中进行。 - Vinaykrishnan
@ Vinaykrishnan,我检查了,它是9.0。 - Naresh
5
这位朋友遇到了同样的问题,检查一下这些链接或许可以帮到你:https://github.com/flutter/flutter/issues/22123 和 https://github.com/CocoaPods/CocoaPods/issues/8069。打开你的 Xcode,在苹果图标的左上方找到 File,然后打开 Workspace Settings 并将构建系统更改为 Legacy Build System。如果你还没有尝试过这个方法,可以查看这个网址的答案:https://dev59.com/oVQK5IYBdhLWcg3wDLvP#52552878 - Vinaykrishnan
29个回答

1

对于遇到这个问题的Cordova开发者

尝试设置

<preference name="deployment-target" value="8.0" />

在config.xml中。

你可能想将它提高到10或11。https://david-smith.org/iosversionstats/ - vr_driver

0

首先将部署更改为您选择的版本,例如'11.0',然后在 Podfile 的末尾添加此步骤。

end
post_install do |installer|
 installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
   config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
  end
 end
end

0

对于 Flutter,我正在使用以下代码位于 <project_root>/ios/Podfile 中。

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
  
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS"] = "armv7"
    config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
  end
end

0

Xcode > Runner > Info deployment Target > IOS Deployment Target: 11.

打开终端:

pod cache clean --all

.

pod update

0

我在构建我的React Native项目时遇到了相同的问题

对我来说,升级cocoapods版本解决了问题(从1.8.4升级到1.11.2)


0
(Flutter)在我的情况下,我不小心导入了dart.js,所以如果它在刚才还能工作,但是在重新加载或新的启动时突然停止,请检查您的导入。

你的回答可以通过提供更多支持信息来改进。请编辑以添加进一步的细节,例如引用或文档,以便他人可以确认你的答案是正确的。您可以在帮助中心中找到有关如何编写良好答案的更多信息。 - Community

0

删除pods文件夹和podfile.lock,在podfile中增加部署目标以及在Xcode中进行修改


0

我在import下方添加了代码,然后看到了这个错误。如果有人遇到同样的问题,这可能会有所帮助。这是未使用的import。

import 'dart:js';

-4

这是M1 MacBook已知的问题。运行flutter upgrade应该可以解决。

当前正在使用 M1 Mackbook 12.0.0 Flutter 2.10.0 Dart 2.16.0


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接