- Android Studio 創(chuàng)建新Flutter項(xiàng)目莫瞬,彈框一直提示Creating狀態(tài)
打開終端郭蕉,運(yùn)行flutter doctor
,提示
Waiting for another flutter command to release the startup lock
解決:
- 打開flutter的安裝目錄
~/flutter/bin/cache
- 刪除
lockfile
文件- 重啟AndroidStudio,可正常新建
終端運(yùn)行flutter doctor
恳不,也可正常運(yùn)行
- AS運(yùn)行項(xiàng)目,使用iOS模擬器规求,插件失效后會(huì)報(bào)錯(cuò)如下
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
- 右鍵顯示包內(nèi)容
info.plist
->DVTPlugInCompatibilityUUIDs
,把上面的UUID復(fù)制進(jìn)去- 重新運(yùn)行項(xiàng)目丛塌,可以正常運(yùn)行
- Xcode升級(jí),AS運(yùn)行項(xiàng)目赴邻,會(huì)報(bào)錯(cuò)
Building for iOS, but the linked and embedded framework 'App.framework'
解決:
- 在根項(xiàng)目目錄下,Clean下項(xiàng)目
flutter clean
- 刪除App.framework
rm -rf ios/Flutter/App.framework
- 再重新運(yùn)行下Flutter姥敛,就ok了