问题一:warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99.
IPHONEOS_DEPLOYMENT_TARGET.png
问题原因:版本大小原因
解决方案:点击ios文件夹->点击podfile修改如下(亲测实用已解决)
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
end
解决方法.png
问题二:Error: Cocopods's repository is too out-of-date satisfy dependencies
问题二.png
解决方案:
删除IOS工程中的Podfile.lock文件,重新pod install(继续执行Flutter run操作)即可解决。
问题三: Error: Cannot run with sound null safety, because the following dependencies don't support null safety:
问题三.png
问题原因:没有配置safety相关
解决方案:可以直接在命令行中执行:
flutter run --no-sound-null-safety
也可以到Android studio中去设置运行配置手动配置safety相关1.png
手动配置safety相关2.png
然后在Additional run args 这行键入一下命令即可。
问题四:Enum cases with associated values cannot be marked potentially unavailable with '@available'
@available报错.png
问题原因:xcode版本更新导致的
解决方案:将爆红处一行隐藏,运行,点击fix即可,会显示正确位置就解决了。
问题五:Warning: Operand of null-aware operation '??' has type 'Color' which excludes null.
image.png
解决方法:
1、找到第一个爆红文件,将311行问号后面的Colors.white删除即可
2、 在相同的文件夹内找到第二个爆红文件,找到106行,删除super.addAllowedPoint这一行即可。
问题六:使用xcode打包上传问题
xcode打包上传问题.png
解决方法 :缺啥补啥呗!已放到百度云盘,可以下载
Application Loader.app链接 提取码: 7iq2
问题七:将问题13解决后出现的打包错误->could not download
打包错误.png
造成原因分析:还不清楚
群友帮助:经常出现,重启电脑多试试
解决方案:暂未找到
问题八:Flutter在ios运行之后,连接xcode能够正常运行,但是手机与电脑断开连接之后,一开打app直接闪退问题
image.png
切换成release模式.png