报错信息如下
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. 2024-09-24 08:56:23.994455+0800 smartmotoios[52875:7310191] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N10__cxxabiv116__shim_type_infoE, id, N10__cxxabiv117__pbase_type_infoE. 2024-09-24 08:56:23.994521+0800 smartmotoios[52875:7310191] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N10__cxxabiv116__shim_type_infoE, id, N10__cxxabiv117__pbase_type_infoE. 2024-09-24 08:56:23.994611+0800 smartmotoios[52875:7310191] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSLayoutConstraint for <UIView: 0x13f63fcb0; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x283340c00>; layer = <CAGradientLayer: 0x283dba620>>: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs.' *** First throw call stack: (0x1e374d288 0x1fc47c744 0x1fc77f1b0 0x1fc77e534 0x10bd0e6a8 0x10bd0e2c0 0x10bd0d260 0x10bd157bc 0x10bd154c4 0x10bd1a33c 0x10bd1a5e8 0x10bd1aa2c 0x10bd21708 0x104adf9f8 0x104a8fdc4 0x104a8e99c 0x104a907b4 0x1e5db89c4 0x1e5fb6030 0x1e5dddbbc 0x1e5caded8 0x1e5cbe17c 0x1e74367fc 0x1e7428c60 0x1e743d5b4 0x1e74464a8 0x1e5c97b2c 0x1e36f50c4 0x1e36c4080 0x1e36bf13c 0x1e36d2bc8 0x1ff83d374 0x1e6046b58 0x1e5dc8090 0x1075a2308 0x10a6f9da4) 2024-09-24 08:56:24.112431+0800 smartmotoios[52875:7310191] [Bugly] Trapped uncaught exception 'NSInvalidArgumentException', reason: 'NSLayoutConstraint for <UIView: 0x13f63fcb0; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x283340c00>; layer = <CAGradientLayer: 0x283dba620>>: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal
解决方法:
在 Xcode 中设置符号断点(symbolic breakpoint),方法是在 Breakpoint Navigator 中添加一个新的符号断点,输入 UIViewAlertForUnsatisfiableConstraints
。这将帮助你定位问题出现的位置。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
2019-09-24 Xcode11 iOS13问题汇总