gpt4 book ai didi

ios - Xcode 构建失败 : Requested but did not find extension point

转载 作者:行者123 更新时间:2023-12-05 08:35:49 26 4
gpt4 key购买 nike

我按照官方的 react-native 设置指南来设置我的 react-native 项目。 (安装所有必需的包 + npx react-native init MyProject + npx react-native start(终端 1)+ npx react-native run-ios (Terminal 2)) 但是,我在尝试构建 ios 应用程序时遇到错误。 This Stackoverflow post似乎没有帮助。

如果你能帮助我,我将不胜感激。这是我的第一个 react-native 设置,所以我不知道如何修复该错误。

这是运行 npx react-native run-ios 时的完整输出:

(base) Lucas-MacBook-Pro-2:MyProject luca$ npx react-native run-iosinfo Found Xcode workspace "MyProject.xcworkspace" info LaunchingiPhone 13 (iOS 15.2) info Building (using "xcodebuild -workspaceMyProject.xcworkspace -configuration Debug -scheme MyProject-destination id=D3DC5A60-6CB5-40B5-B610-4760B38C1941") error Failed to build iOS project. We ran "xcodebuild" command but it exited witherror code 65. To debug build logs further, consider building your appwith Xcode.app, by opening MyProject.xcworkspace. Command lineinvocation:/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace MyProject.xcworkspace -configuration Debug -scheme MyProject -destination id=D3DC5A60-6CB5-40B5-B610-4760B38C1941

User defaults from command line:IDEPackageSupportUseBuiltinSCM = YES

note: Using new build system note: Planning Analyze workspace

Create build description Build description signature:58652ba6d5e25b644cfcef8d1c74529a Build description path:/Users/luca/Library/Developer/Xcode/DerivedData/MyProject-eqgmgatmlgqlskcmpchtodpmmbab/Build/Intermediates.noindex/XCBuildData/58652ba6d5e25b644cfcef8d1c74529a-desc.xcbuild

note: Build preparation complete note: Building targets in dependencyorder error: unable to attach DB: error: accessing build database"/Users/luca/Library/Developer/Xcode/DerivedData/MyProject-eqgmgatmlgqlskcmpchtodpmmbab/Build/Intermediates.noindex/XCBuildData/build.db":database is locked Possibly there are two concurrent builds running inthe same filesystem location.

2022-05-08 12:19:42.347 xcodebuild[2512:185622] Requested but did notfind extension point with identifierXcode.IDEKit.ExtensionSentinelHostApplications for extensionXcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-incom.apple.dt.IDEWatchSupportCore 2022-05-08 12:19:42.353xcodebuild[2512:185622] Requested but did not find extension pointwith identifierXcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extensionXcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS ofplug-in com.apple.dt.IDEWatchSupportCore** BUILD FAILED **

要检查所有版本信息,这里是 npx react-native info 的输出:

System:OS: macOS 12.0.1CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHzMemory: 31.59 MB / 8.00 GBShell: 3.2.57 - /bin/bashBinaries:Node: 14.16.1 - /usr/local/bin/nodeYarn: Not Foundnpm: 6.14.12 - /usr/local/bin/npmWatchman: 2022.03.21.00 - /usr/local/bin/watchmanManagers:CocoaPods: 1.11.3 - /usr/local/bin/podSDKs:iOS SDK:Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5Android SDK: Not FoundIDEs:Android Studio: 3.5 AI-191.8026.42.35.5977832Xcode: 13.3.1/13E500a - /usr/bin/xcodebuildLanguages:Java: 16.0.1 - /usr/bin/javacnpmPackages:@react-native-community/cli: Not Foundreact: 17.0.2 => 17.0.2react-native: 0.68.1 => 0.68.1react-native-macos: Not FoundnpmGlobalPackages:react-native: Not Found

最佳答案

快速修复:

  1. https://developer.apple.com 手动下载 Xcode 命令行工具

  2. 使用sudo xcode-select -s/Library/Developer/CommandLineTools激活下载的命令行工具

  3. 重启 Xcode

  4. (仅适用于官方 react-native 设置):注释掉 ios/Podfile 中的这些行:
    use_flipper!()
    # post_install do |installer|
    react_native_post_install(安装程序)__apply_Xcode_12_5_M1_post_install_workaround(安装程序)
    结束

  5. (仅适用于官方 react-native 设置):运行 pod update

错误描述:我终于能够解决这个问题。由于我只是按照 MacO 的设置指南进行操作,如 here 所述,我认为详细说明我为解决上述问题所做的工作很有用。有些人可能面临同样的困难。

首先要注意的是:底层错误是由 Xcode 本身引起的。

error: unable to attach DB: error: accessing build database [...]

只是输出中其他两个错误的结果,即

Requested but did not find extension point with identifier Xcode [...]

第一次运行应用程序时会出现这些错误。尝试重新启动应用程序时,程序的较早实例仍会尝试访问导致错误的数据库。

因此,我将解释如何修复缺少的依赖项 Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOSXcode.DebuggerFoundation.AppExtensionHosts.watchOS。我发现如何根据 this Apple Community post 修复该错误.就我而言,我必须从 Apple Developer Website 手动安装 Xcode 命令行工具。 .接下来,Xcode 必须使用 sudo xcode-select -s/Library/Developer/CommandLineTools 集成这些下载的命令行工具。重新启动 Xcode 并按照 react-native 的官方设置指南进行操作后,您将面临另一个构建错误。

会出现这个错误是因为 Xcode 的初始配置与 ios 上的 npm react-native init MyProject 生成的 Podfile 发生冲突。要解决此问题,请注释掉 podfile 中的行(请参阅 4.),并在运行 pod update 后,您的 react-native 设置应该最终可以正常工作。

我希望我能够帮助一些迷路的开发人员,他们希望开始使用适用于 iOS 应用程序的 React Native。

关于ios - Xcode 构建失败 : Requested but did not find extension point,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72160143/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com