当前位置: 代码迷 >> 综合 >> Terminating app due to uncaught exception ‘NSInternalInconsistencyException‘, reason: ‘<xxx: 0xxxx>
  详细解决方案

Terminating app due to uncaught exception ‘NSInternalInconsistencyException‘, reason: ‘<xxx: 0xxxx>

热度:95   发布时间:2024-02-06 21:52:59.0

今天一个新接手的项目出现了这样的错误:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '<xxx: 0xxxx> returned nil from -traitCollection, which is not allowed.'

全局断点也不能找到正确的位置

原因是尖括号里的类没有初始化,竟然只写了alloc没有init

  相关解决方案