Ben*_*ins 12 xcode ios flutter
我认为我的 flutter 正在从我拥有 xcode-beta 时开始在错误的路径中寻找某些 xcode 资源。
请注意,此处显示 Xcode-beta.app:
无法在 URL file:///Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/DeviceTypes/iPhone%20SE%20(3rd%20 Generation) 中找到捆绑包).simdevicetype
我在哪里更新这个路径?
完整错误:
2022-06-18 23:24:33.191 xcodebuild[87140:10387974] 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-06-18 23:24:33.191 xcodebuild[87140:10387974] 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
2022-06-18 23:24:33.369 xcodebuild[87140:10387987] Unable to locate a bundle at URL
file:///Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profi
les/DeviceTypes/iPhone%20SE%20(3rd%20generation).simdevicetype/
2022-06-18 23:24:33.369 xcodebuild[87140:10387987] Unable to locate a bundle at URL
file:///Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profi
les/Runtimes/iOS.simruntime/
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ id:19E93EFA-2B83-48DD-A04A-311B6B96EDA5 }
The requested device could not be found because no available devices matched the request.
Available destinations for the "Runner" scheme:
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006001-001260D90C89801E }
Ineligible destinations for the "Runner" scheme:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
Run Code Online (Sandbox Code Playgroud)
我已经经历过这些 SO 答案,例如这些命令:
xcrun -sdk iphoneos --show-sdk-path
xcrun -sdk iphoneos --show-sdk-version
xcrun -sdk iphoneos --show-sdk-build-version
xcrun -sdk iphoneos --show-sdk-platform-path
xcrun -sdk iphoneos --show-sdk-platform-version
Run Code Online (Sandbox Code Playgroud)
将其添加到 .zhrc
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk
Run Code Online (Sandbox Code Playgroud)
然后跑了source ~/.zshrc
没有任何效果。
编辑:我开发的另一个应用程序运行良好,所以我想这与我的 mac 设置无关,问题出在我的项目上。那我就迷路了。当我创建一个全新的 flutter 应用程序时,我遇到了同样的错误。
这里的底部答案有帮助。实体 iPhone 是唯一可以使用的设备。
tua*_*ptn 18
这是 xcode 的问题,当 xcode select 不与 CommandLineTools 链接时,在命令下面运行以链接它
// reset to the default command line tools path
xcode-select -r
// Link xcode-select with CommandLineTools
sudo xcode-select -s /Library/Developer/CommandLineTools
Run Code Online (Sandbox Code Playgroud)
有时,您需要将手动 xcode-select 与 xcode 工具链接起来
'Xcode' -> 'Preferences' -> 'Location' -> Set 'Command Line Tools' again.
因为当你重置 xcode-select 时,这部分也会重置。
如果那不起作用。也许钥匙串的问题不是解锁。
你需要通过以下方式解锁
security unlock-keychain
Run Code Online (Sandbox Code Playgroud)
或者用密码
security unlock-keychain -p <password>
Run Code Online (Sandbox Code Playgroud)
希望这个方法可以帮到你,谢谢。
这个错误只是一个误导性的警告,不要花时间在上面。或者您可以按照此答案所述进行操作,但然后在错误下方查看另一个错误,即实际问题。我想我正在尝试解决错误的错误。也许最重要的错误消息没有发布在这个问题中,因为它当时没有显示:
为 iOS 模拟器构建,但链接到为 iOS 构建的目标文件,文件 GoogleMaps.framework/GoogleMaps 用于架构 arm64
我必须按照这个答案所说的那样,将“arm64”添加到 Runner > Project > Build Settings > Architectures 下的 Runner 项目和 Pods 项目的“排除的架构”中:
并将其添加到 podfile 中:
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
Run Code Online (Sandbox Code Playgroud)
这确实是我职业生涯中最悲伤的事情。
| 归档时间: |
|
| 查看次数: |
21956 次 |
| 最近记录: |