Xcode Storyboard 是黑色的(发生内部错误) [英] Xcode Storyboard is black (An internal error occurred)

查看:153
本文介绍了Xcode Storyboard 是黑色的(发生内部错误)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大问题.由于两天 Xcode 只显示黑色的故事板,如下所示.正如您可以想象的那样,这对我来说很糟糕,因为我无法在背景变黑的情况下工作.

I have a big problem. Since two days Xcode only shows the Storyboards in black like shown below. As you can imagine it is terrible for me as i can not work with the background blacked out.

显示的错误是发生内部错误.编辑功能可能会受到限制."

The error that is shown is "An internal error occurred. Editing functionality may be limited."

您可以在下方看到包含错误的 Log.txt

    DATE:
=================================

Monday, 1. February 2021 at 21:43:26 Central European Standard Time
2021-02-01 20:43:26 +0000



=================================
    XCODE VERSION INFO:
=================================

Version = 12.4 (12D4e)
Plugin Version = 17701
Beta Version = 1
OS Version = 11.2 (20D64)



=================================
    ERROR:
=================================

Encountered an error communicating with IBAgent-iOS. (Failure reason: IBAgent-iOS (-1) failed to launch): Failed to launch IBAgent-iOS via CoreSimulator spawn (Failure reason: Failed to spawn IBAgent-iOS on iPhone Xʀ (0670D6F0-16E0-43A4-9E6E-D2B37DCD777D, iOS 14.4, Booted)): Invalid device state

Error Domain=com.apple.InterfaceBuilder Code=-1 "Encountered an error communicating with IBAgent-iOS." UserInfo={NSLocalizedFailureReason=IBAgent-iOS (-1) failed to launch, NSUnderlyingError=0x7f94b9b4a510 {Error Domain=com.apple.CoreSimulator.SimError Code=405 "Failed to launch IBAgent-iOS via CoreSimulator spawn" UserInfo={NSLocalizedFailureReason=Failed to spawn IBAgent-iOS on iPhone Xʀ (0670D6F0-16E0-43A4-9E6E-D2B37DCD777D, iOS 14.4, Booted), NSLocalizedDescription=Failed to launch IBAgent-iOS via CoreSimulator spawn, NSUnderlyingError=0x7f94b9b6f6f0 {Error Domain=com.apple.CoreSimulator.SimError Code=405 "Invalid device state" UserInfo={NSLocalizedDescription=Invalid device state}}}}, NSLocalizedRecoverySuggestion=Please check Console.app for crash reports for "IBAgent-iOS" for further information., NSLocalizedDescription=Encountered an error communicating with IBAgent-iOS.}



=================================
    TOOL DESCRIPTION:
=================================

<IBCocoaTouchPlatformToolDescription: 0x7f94af942a40> {
| targetRuntime.identifier: IBCocoaTouchFramework-fourteenAndLater
| _roleString: System content
| deviceTypeDescription: <IBSimulatorDeviceTypeDescription: 0x7f94aef53f60> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-XR
}



=================================
    LAUNCH CONTEXT:
=================================

<IBCocoaTouchToolLaunchContext: 0x7f9519cb45c0> {
| toolDescription.ib_verboseDescription: <IBCocoaTouchPlatformToolDescription: 0x7f94af942a40> {
| | targetRuntime.identifier: IBCocoaTouchFramework-fourteenAndLater
| | _roleString: System content
| | deviceTypeDescription: <IBSimulatorDeviceTypeDescription: 0x7f94aef53f60> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-XR
| }
| launchPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/IBAgent-iOS
| frameworkSearchPaths: (
    "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks"
)
| toolName: IBAgent-iOS
| platformName: iphonesimulator
| applicationTool: 0
| processIdentifier: -1
| exitStatus: (null)
| signalStatus: (null)
}



=================================
    EXECUTION CONTEXT:
=================================

<IBSimulatorToolCoreSimulatorBootedCLIExecutionContext: 0x7f94aafaa880 busyCount=0, Idle for 0.0 secs> {
| device: iPhone Xʀ (0670D6F0-16E0-43A4-9E6E-D2B37DCD777D, iOS 14.4, Booted)
}



=================================
    DEVICE:
=================================

iPhone Xʀ (0670D6F0-16E0-43A4-9E6E-D2B37DCD777D, iOS 14.4, Booted)



=================================
    TOOL MANAGER:
=================================

<IBCocoaTouchToolManager: 0x7f94aef33af0>



=================================
    REASON FOR REQUESTING TOOL:
=================================

Preflighting tools for opening document <IBStoryboardDocument: 0x7f94bb9ffa00>: <IBCocoaTouchTargetRuntime: 0x7f94aef42bd0>



=================================
    XCODE BACKTRACE:
=================================

  0   +[IBPlatformToolFailureHandler failureHandlerWithContext:failure:diagnosticsHandlerBlock:] (in IDEInterfaceBuilderKit)
  1   +[IBAbstractInterfaceBuilderPlatformToolManager _THREADSAFE_injectDiagnosticsHandlerWithFailureContext:intoError:forLaunchingToolWithError:] (in IDEInterfaceBuilderKit)
  2   +[IBAbstractInterfaceBuilderPlatformToolManager _THREADSAFE_launchNewToolWithLaunchContext:executionContext:toolProxyClass:proxyDelegate:failureContext:requestingMethod:error:forReason:] (in IDEInterfaceBuilderKit)
  3   __117-[IBAbstractInterfaceBuilderPlatformToolManager asyncLaunchNewToolWithDescription:queue:completionHandler:forReason:]_block_invoke.429 (in IDEInterfaceBuilderKit)
  4   _dispatch_call_block_and_release (in libdispatch.dylib)
  5   _dispatch_client_callout (in libdispatch.dylib)
  6   _dispatch_lane_serial_drain (in libdispatch.dylib)
  7   _dispatch_lane_invoke (in libdispatch.dylib)
  8   _dispatch_workloop_worker_thread (in libdispatch.dylib)
  9   _pthread_wqthread (in libsystem_pthread.dylib)
 10   start_wqthread (in libsystem_pthread.dylib)




=================================
    SDKS:
=================================

iOS 14.4 (iphoneos14.4):
version = 14.4
platform = com.apple.platform.iphoneos
versionInfo = {
    BuildID = "34AA5D88-518E-11EB-91C4-72143A615026";
    ProductBuildVersion = 18D46;
    ProductCopyright = "1983-2021 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "14.4";
}

macOS 11.1 (macosx11.1):
version = 11.1
platform = com.apple.platform.macosx
versionInfo = {
    ProductBuildVersion = 20C63;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = macOS;
    ProductUserVisibleVersion = "11.1";
    ProductVersion = "11.1";
    iOSSupportVersion = "14.3";
}

Simulator - iOS 14.4 (iphonesimulator14.4):
version = 14.4
platform = com.apple.platform.iphonesimulator
versionInfo = {
    BuildID = "34AA5D88-518E-11EB-91C4-72143A615026";
    ProductBuildVersion = 18D46;
    ProductCopyright = "1983-2021 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "14.4";
}

Simulator - watchOS 7.2 (watchsimulator7.2):
version = 7.2
platform = com.apple.platform.watchsimulator
versionInfo = {
    BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB";
    ProductBuildVersion = 18S561;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "7.2";
}

watchOS 7.2 (watchos7.2):
version = 7.2
platform = com.apple.platform.watchos
versionInfo = {
    BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB";
    ProductBuildVersion = 18S561;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "7.2";
}

Simulator - iOS 14.4 (iphonesimulator14.4):
version = 14.4
platform = com.apple.platform.iphonesimulator
versionInfo = {
    BuildID = "34AA5D88-518E-11EB-91C4-72143A615026";
    ProductBuildVersion = 18D46;
    ProductCopyright = "1983-2021 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "14.4";
}

tvOS 14.3 (appletvos14.3):
version = 14.3
platform = com.apple.platform.appletvos
versionInfo = {
    BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887";
    ProductBuildVersion = 18K559;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "14.3";
}

tvOS 14.3 (appletvos14.3):
version = 14.3
platform = com.apple.platform.appletvos
versionInfo = {
    BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887";
    ProductBuildVersion = 18K559;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "14.3";
}

Simulator - watchOS 7.2 (watchsimulator7.2):
version = 7.2
platform = com.apple.platform.watchsimulator
versionInfo = {
    BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB";
    ProductBuildVersion = 18S561;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "7.2";
}

iOS 14.4 (iphoneos14.4):
version = 14.4
platform = com.apple.platform.iphoneos
versionInfo = {
    BuildID = "34AA5D88-518E-11EB-91C4-72143A615026";
    ProductBuildVersion = 18D46;
    ProductCopyright = "1983-2021 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "14.4";
}

watchOS 7.2 (watchos7.2):
version = 7.2
platform = com.apple.platform.watchos
versionInfo = {
    BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB";
    ProductBuildVersion = 18S561;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "7.2";
}

Simulator - tvOS 14.3 (appletvsimulator14.3):
version = 14.3
platform = com.apple.platform.appletvsimulator
versionInfo = {
    BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887";
    ProductBuildVersion = 18K559;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "14.3";
}

macOS 11.1 (macosx11.1):
version = 11.1
platform = com.apple.platform.macosx
versionInfo = {
    ProductBuildVersion = 20C63;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = macOS;
    ProductUserVisibleVersion = "11.1";
    ProductVersion = "11.1";
    iOSSupportVersion = "14.3";
}

DriverKit 20.2 (driverkit.macosx20.2):
version = 20.2
platform = com.apple.platform.macosx
versionInfo = {
}

Simulator - tvOS 14.3 (appletvsimulator14.3):
version = 14.3
platform = com.apple.platform.appletvsimulator
versionInfo = {
    BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887";
    ProductBuildVersion = 18K559;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "14.3";
}

我已经尝试过

  • 更新 Mac 软件
  • 更新 Xcode
  • 清理项目
  • 关闭Xcode
  • 重启 Mac
  • 在首选项中设置派生数据>默认位置

你可以在这里看到黑屏

如果你能帮我解决这个问题就太好了.

It would be very nice if you can help me to solve this.

非常感谢

最大

推荐答案

更新:此问题已在 Xcode 12.5 版本中修复

Update: This issue fixed with Xcode 12.5 release

我今天遇到了同样的错误,我尝试了您提到的方法,但都没有奏效.然后我想起我在 Xcode 的获取信息" 中选中了 使用 Rosetta 打开".当我取消选中此选项、清理项目并重新打开 Xcode 时,它就可以工作了.

I got this same error today and I tried the ways that you mentioned, but none of them worked. And then I remembered that I checked "Open using Rosetta" in Xcode's "Get Info". When I unchecked this option, cleaned the project, and reopened Xcode, it works.

如果你使用 MB 和 M1 芯片,我想你可以试试这个.

If you are using MB with an M1 chip, I think you can try this.

但我应该警告您,如果您取消选中使用 Rosetta 打开" 选项,您可能会看到IPA 处理失败";实现项目时出错.更多详细信息:如何修复IPA 处理失败";在带有 MAC M1 的 Xcode 12.2 中

But I should warn you if you unchecked "Open using Rosetta" option, you can get "IPA processing failed" error when you achieve the project. More detail: How to fix "IPA processing failed" in Xcode 12.2 with MAC M1

这篇关于Xcode Storyboard 是黑色的(发生内部错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆