- Creating flutter project 卡住:
在Android Studio安装目录下的文件夹,找到 idea.properties 文件,在最后加上一句:
disable.android.first.run=true
保存,重启AS,新建flutter项目,就可以顺利的过去了
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,拉去路径
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可自行百度,查看当前版本为1.10,下载最新版本,使用xcode编译后,将 product 文件夹内的 ios-deploy 文件替换掉上述目录内的文件即可
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')
- 在项目根目录下:
lutter clean
- 删除ios/Flutter/App.framework:
rm -rf ios/Flutter/App.framework
- flutter 升级:在终端里使用
flutter upgrade
或flutter upgrade --force
-
flutter upgrade
时出现如下错误error: RPC failed; curl 18 transfer closed with outstanding read data remaining
缓存区溢出curl的postBuffer的默认值太小,需要增加缓存
使用git命令增大缓存(单位是b,524288000B也就500M左右)git config --global http.postBuffer 524288000
使用git config --list查看是否生效
- 应用一直
Installing and launching...
,多数情况是需要对Flutter 进行升级
- 删除 Derived data 下的文件,在“前往文件夹”中输入
~/Library/Developer/Xcode/DerivedData
删除文件夹下文件
error: Building for iOS, but the linked and embedded framework 'App.framework' was built for iOS Simulator. (in target 'Runner' from project 'Runner')
- 在项目根目录下
flutter clean
- 然后删除ios/Flutter/App.framework:
rm -rf ios/Flutter/App.framework