問題一: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
問題原因:版本大小原因
解決方案:點(diǎn)擊ios文件夾->點(diǎn)擊podfile修改如下(親測(cè)實(shí)用已解決)
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(繼續(xù)執(zhí)行Flutter run操作)即可解決浪感。
問題三: Error: Cannot run with sound null safety, because the following dependencies don't support null safety:
問題三.png
問題原因:沒有配置safety相關(guān)
解決方案:可以直接在命令行中執(zhí)行:
flutter run --no-sound-null-safety
也可以到Android studio中去設(shè)置運(yùn)行配置手動(dòng)配置safety相關(guān)1.png
手動(dòng)配置safety相關(guān)2.png
然后在Additional run args 這行鍵入一下命令即可干像。
問題四:Enum cases with associated values cannot be marked potentially unavailable with '@available'
@available報(bào)錯(cuò).png
問題原因:xcode版本更新導(dǎo)致的
解決方案:將爆紅處一行隱藏扁瓢,運(yùn)行劫映,點(diǎn)擊fix即可恐仑,會(huì)顯示正確位置就解決了择同。
問題五:Warning: Operand of null-aware operation '??' has type 'Color' which excludes null.
image.png
解決方法:
1、找到第一個(gè)爆紅文件轨奄,將311行問號(hào)后面的Colors.white刪除即可
2孟害、 在相同的文件夾內(nèi)找到第二個(gè)爆紅文件,找到106行挪拟,刪除super.addAllowedPoint這一行即可挨务。
問題六:使用xcode打包上傳問題
xcode打包上傳問題.png
解決方法 :缺啥補(bǔ)啥唄!已放到百度云盤石景,可以下載
Application Loader.app鏈接 提取碼: 7iq2
問題七:將問題13解決后出現(xiàn)的打包錯(cuò)誤->could not download
打包錯(cuò)誤.png
造成原因分析:還不清楚
群友幫助:經(jīng)常出現(xiàn)劈猿,重啟電腦多試試
解決方案:暫未找到
問題八:Flutter在ios運(yùn)行之后,連接xcode能夠正常運(yùn)行,但是手機(jī)與電腦斷開連接之后,一開打app直接閃退問題
image.png
切換成release模式.png