Flutter issues 記錄

  1. Creating flutter project 卡?。?/li>

在Android Studio安裝目錄下的文件夾,找到 idea.properties 文件,在最后加上一句:
disable.android.first.run=true
保存,重啟AS,新建flutter項目,就可以順利的過去了

  1. Cannot find "xcodebuild". Xcode 11.0 or greater is required to develop for iOS. Could not build the precompiled application for the device.

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
如果路徑不對,可以找到Xcode,拉去路徑

  1. Your Xcode version may be too old for your iOS version, The service is invalid. AMDeviceSecureSta...

報錯的元兇是flutter/bin/cache/artifacts/ios-deploy/ios-deploy,不知道ios-deploy可自行百度,查看當(dāng)前版本為1.10,下載最新版本,使用xcode編譯后,將 product 文件夾內(nèi)的 ios-deploy 文件替換掉上述目錄內(nèi)的文件即可

  1. error: The linked and embedded framework 'App.framework' is missing one or more architectures required by this target: armv7. (in target 'Runner' from project 'Runner')
  1. 在項目根目錄下:lutter clean
  2. 刪除ios/Flutter/App.framework:rm -rf ios/Flutter/App.framework
  1. flutter 升級:在終端里使用 flutter upgradeflutter upgrade --force
  2. flutter upgrade 時出現(xiàn)如下錯誤error: RPC failed; curl 18 transfer closed with outstanding read data remaining

緩存區(qū)溢出curl的postBuffer的默認(rèn)值太小,需要增加緩存
使用git命令增大緩存(單位是b,524288000B也就500M左右)git config --global http.postBuffer 524288000
使用git config --list查看是否生效

  1. 應(yīng)用一直 Installing and launching... ,多數(shù)情況是需要對Flutter 進(jìn)行升級
  1. 刪除 Derived data 下的文件,在“前往文件夾”中輸入 ~/Library/Developer/Xcode/DerivedData 刪除文件夾下文件
  1. error: Building for iOS, but the linked and embedded framework 'App.framework' was built for iOS Simulator. (in target 'Runner' from project 'Runner')
  1. 在項目根目錄下 flutter clean
  2. 然后刪除ios/Flutter/App.framework:rm -rf ios/Flutter/App.framework
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

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