- Android Studio 创建新Flutter项目,弹框一直提示Creating状态
打开终端,运行flutter doctor
,提示
Waiting for another flutter command to release the startup lock
解决:
- 打开flutter的安装目录
~/flutter/bin/cache
- 删除
lockfile
文件- 重启AndroidStudio,可正常新建
终端运行flutter doctor
,也可正常运行
- AS运行项目,使用iOS模拟器,插件失效后会报错如下
Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running Xcode build...
Xcode build done. 26.0s
Failed to build iOS app
Error output from Xcode build:
↳
xcodebuild[11036:4038649] [MT] PluginLoading: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
** BUILD FAILED **
Xcode's output:
↳
ld: can't map file, errno=22 file 'Flutter' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro.
解决:
- 获取Xcode的UUID
终端输入defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
- 前往文件夹,打开目录
~/Library/Application Support/Developer/Shared/Xcode/Plug-ins
找到RevealPlugin.xcplugin
- 右键显示包内容
info.plist
->DVTPlugInCompatibilityUUIDs
,把上面的UUID复制进去- 重新运行项目,可以正常运行
- Xcode升级,AS运行项目,会报错
Building for iOS, but the linked and embedded framework 'App.framework'
解决:
- 在根项目目录下,Clean下项目
flutter clean
- 删除App.framework
rm -rf ios/Flutter/App.framework
- 再重新运行下Flutter,就ok了