[英]Xcode build done. Failed to build iOS app - Flutter project
[英]XCode13.4 run flutter project failed to build iOS app
我剛剛在 macOS Monterey 12.4 中升級到 Xcode 13.4,運行 flutter 項目得到了這個錯誤:
Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore 2022-05-21 15:44:37.106 xcodebuild[21400:114339] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore ** BUILD FAILED **
現在,我很困惑,我正在設備上運行 Flutter iOS 應用程序,為什么會出現像 watchOS 這樣的錯誤? 而且我完全不知道如何解決這個錯誤。 任何人都可以幫助我嗎?
我花了一天時間來解決這個問題。
這對我有用:
首先刪除 CommandLineTools
sudo rm -rf /Library/Developer/CommandLineTools
重新安裝命令行工具
xcode-select --install
選擇命令行工具
sudo xcode-select -s /Library/Developer/CommandLineTools
后
cd ios
pod install
pod update
Then clean your project
Rebuild your project
我的問題通過這些步驟解決了。 我不知道它是否適合你,但值得一試。
而且; 您應該檢查 mac 更新。 例如,我收到了安裝 xcode 工具的通知。
就我而言,這是我的錯誤
Error output from Xcode build:
↳
2022-05-18 15:24:19.369 xcodebuild[2195:13656] Requested but did not find extension point with identifier
Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of
plug-in com.apple.dt.IDEWatchSupportCore
2022-05-18 15:24:19.369 xcodebuild[2195:13656] Requested but did not find extension point with identifier
Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension
Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
/Users/user/flutter/packages/flutter_tools/bin/xcode_backend.sh:12: parse error near `('
Command PhaseScriptExecution failed with a nonzero exit code
我懷疑/Users/user/flutter/packages/flutter_tools/bin/xcode_backend.sh:12
原創內容:
...
function follow_links() (
...
)
PROG_NAME="$(follow_links "${BASH_SOURCE[0]}")"
...
我把它改成
...
function follow_links() {
...
}
PROG_NAME="$(follow_links "$0")"
...
然后構建成功。
我的結論是“ Error output from Xcode build
”只是一個警告。 錯誤是由於其他原因。 就我而言,它位於xcode_backend.sh
也許需要升級您的 SDK。 嘗試使用 2.10.0。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.