ios - 'NSInternalInconsistencyException',原因:'无法在 iOS 11 之前的设备上解码特殊类型'14'
问题描述
我的一个屏幕崩溃了,它是使用 xib 文件启动的。崩溃日志很忙,实际上并没有指出可能是罪魁祸首。在 iOS 11 和 12 上一切正常。我搜索了网络,因为 NSInternalInconsistencyException 很常见,但没有找到与我相同的原因。
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'cannot decode special type '14''
*** First throw call stack:
(
0 CoreFoundation 0x04faa494 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x04772e02 objc_exception_throw + 50
2 CoreFoundation 0x04faa3bd +[NSException raise:format:] + 141
3 Foundation 0x01f62945 newDecodedValue + 497
4 Foundation 0x01f65ce4 -[NSPlaceholderValue initWithCoder:] + 32
5 UIKit 0x0379949d UINibDecoderDecodeObjectForValue + 739
6 UIKit 0x037991b2 -[UINibDecoder decodeObjectForKey:] + 320
7 UIKit 0x034bb719 -[_UIAttributeTraitStorageRecord initWithCoder:] + 157
8 UIKit 0x0379949d UINibDecoderDecodeObjectForValue + 739
9 UIKit 0x037996ae UINibDecoderDecodeObjectForValue + 1268
10 UIKit 0x037991b2 -[UINibDecoder decodeObjectForKey:] + 320
11 UIKit 0x034ba383 -[_UITraitStorage initWithCoder:] + 227
12 UIKit 0x0379949d UINibDecoderDecodeObjectForValue + 739
13 UIKit 0x037996ae UINibDecoderDecodeObjectForValue + 1268
14 UIKit 0x037991b2 -[UINibDecoder decodeObjectForKey:] + 320
15 UIKit 0x034b9fdd -[_UITraitStorageList initWithCoder:] + 174
16 UIKit 0x0379949d UINibDecoderDecodeObjectForValue + 739
17 UIKit 0x037996ae UINibDecoderDecodeObjectForValue + 1268
18 UIKit 0x037991b2 -[UINibDecoder decodeObjectForKey:] + 320
19 UIKit 0x03585f21 -[UINib instantiateWithOwner:options:] + 1627
20 UIKit 0x03312380 -[UIViewController _loadViewFromNibNamed:bundle:] + 429
解决方案
事实证明,iOS 11 之前的设备不支持使用语言方向边距。将其替换为 Xib 中的标准边距,错误原因为:“无法解码特殊类型 '14'”应该得到解决。
推荐阅读
- c# - 删除额外的正文参数或将 WebGetAttribute/WebInvokeAttribute 上的 BodyStyle 属性设置为 Wrapped
- ssl - 谷歌云 - 连接超时,TLS - 握手
- python - 如何按浮动子列表的项目对列表列表进行排序
- php - 如果在特定内容中则跳过匹配
- c# - 打包 URI NUnit 测试问题
- ios - 使用 Cocoapods 将多个 dylib 组合到 iOS 的单个框架中
- php - 如何在 PHP 脚本的 SQL 请求中不使用 IN 运算符过滤搜索结果
- c# - C# XML 反序列化为一张表中的 DataSet
- express - Express 中间件,对请求对象的更改不会持续存在
- java - 如何找到字符串中最长的单词?