【问题标题】:XCode13.4 run flutter project failed to build iOS appXCode13.4运行flutter项目构建iOS应用失败
【发布时间】:2022-07-20 23:54:06
【问题描述】:

我刚刚在macOS Monterey 12.4升级到Xcode 13.4,运行flutter项目出现这个错误:

已请求但未找到带有标识符的扩展点 Xcode.IDEKit.ExtensionSentinelHostApplications 插件的扩展 Xcode.DebuggerFoundation.AppExtensionHosts.watchOS com.apple.dt.IDEWatchSupportCore 2022-05-21 15:44:37.106 xcodebuild[21400:114339] 已请求但未找到带标识符的扩展点 Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS 的插件 com.apple.dt.IDEWatchSupportCore ** 构建失败 **

现在,我很困惑,我在设备上运行 Flutter iOS 应用程序,为什么会出现 watchOS 之类的错误? 而且我完全不知道如何解决这个错误。 谁能帮帮我?

【问题讨论】:

  • 我遇到了同样的问题。你解决问题了吗?
  • 还没有!!!!!!!!!
  • 我添加了解决我的问题的步骤作为答案。也许它会派上用场。

标签: ios xcode flutter


【解决方案1】:

我花了一天时间解决这个问题。

这对我有用:

首先删除 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 工具的通知。

【讨论】:

  • 谢谢!但这对我没有用
  • 已修复,是我的Xcode路径配置问题
【解决方案2】:

就我而言,这是我的错误

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

【讨论】:

    猜你喜欢
    • 2022-08-17
    • 2022-01-16
    • 2020-03-16
    • 1970-01-01
    • 2019-07-21
    • 2022-11-12
    • 2021-05-09
    • 2022-08-10
    • 2020-12-28
    相关资源
    最近更新 更多