Flutter 更新1.20版本遇到的坑

1.許多插件無法使用

更新一下版本號(hào),然后,關(guān)機(jī)重啟一下應(yīng)該就可以了

2.啟動(dòng)iOS模擬器遇到問題Method does not override any method from its superclass

更新application的代碼

override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }

3.iOS編譯錯(cuò)誤

 Multiple commands produce 
'/Users/XXXX/Library/Developer/Xcode/DerivedData/YYYY- 
hbbiovvwitmvkrblqxqkthsyfong/Build/Products/Debug-iphoneos/YYYY.app':
1) Target 'YYYY' has create directory command with output 
'/Users/XXXX/Library/Developer/Xcode/DerivedData/Gallery- 
hbbiovvwitmvkrblqxqkthsyfong/Build/Products/Debug-iphoneos/YYYY.app'
2) That command depends on command in Target 'YYYYY': script phase “[CP] Copy Pods Resources”

解答文章http://www.itdecent.cn/p/5d2d91f6df0e
報(bào)類似的錯(cuò)誤需要去到tagets 里Build Phases下 [CP]copy pods Resources 刪除Output files里的{TARGET_BUILD_DIR}/{UNLOCALIZED_RESOURCES_FOLDER_PATH}

刪除以后再用Android Studio build一下,發(fā)現(xiàn)會(huì)提示你用命令flutter create .

記得恢復(fù)Runner以后把版本號(hào)寫一下,不然你會(huì)有
The application's Info.plist does not contain CFBundleShortVersionString.這個(gè)錯(cuò)誤

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容