Xcode 即使在安装 "Xcode Version 11.2.1 (11B500)" 之后,仍然会导致使用 UITextView 的应用程序崩溃

Xcode still cause apps using UITextView to crash even after installing "Xcode Version 11.2.1 (11B500)"

Xcode 即使在从应用商店安装 "Xcode Version 11.2.1 (11B500)" 后,仍然会导致使用 UITextView 的应用崩溃。

实际上,我在安装 "Xcode 11.2.1 (11B500)" 后 运行 设备上的应用程序时遇到了这个问题。我收到以下错误响应。

Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UITextLayoutView because no class named _UITextLayoutView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'

解决上述问题:

  1. 我必须清除派生数据文件夹,转到路径: ~/Library/Developer/Xcode/DerivedData.
  2. 然后我使用菜单清理了构建文件夹:产品 -> 清理构建文件夹(Shift + Command + K)

现在应用程序不会因 UITextView 问题而崩溃。