[英]How to fix “objc[29072]: Class CLSUserDefaults is implemented in both” crash?
I updated my Xcode from 10.2 to 11. The project is compiling successfully, but when I run the project, it crashes.我将我的 Xcode 从 10.2 更新到 11。项目编译成功,但是当我运行项目时,它崩溃了。 The log generates the following info:
日志生成以下信息:
objc[29072]: Class CLSUserDefaults is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ClassKit.framework/ClassKit (0x7fff87a74e58) and /Users/anuranjanbose/Library/Developer/CoreSimulator/Devices/5EFF8F09-CBA0-491D-9E73-F8C75A0D4FE3/data/Containers/Bundle/Application/5E7E0F5F-EEFF-4252-9A40-14858F90EEE8/MyProject.app/MyProject (0x1026f3e60). objc[29072]:Class CLSUserDefaults 在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/ 中都实现了Library/Frameworks/ClassKit.framework/ClassKit (0x7fff87a74e58) 和 /Users/anuranjanbose/Library/Developer/CoreSimulator/Devices/5EFF8F09-CBA0-491D-9E73-F8C75A0D4FE3/data/Containers/Bundle/Application/5E7E0F5F-EEFF-4252- 9A40-14858F90EEE8/MyProject.app/MyProject (0x1026f3e60)。 One of the two will be used.
将使用两者之一。 Which one is undefined.
哪一个是未定义的。 libc++abi.dylib: terminating with uncaught exception of type NSException
libc++abi.dylib:以 NSException 类型的未捕获异常终止
If you are you using Crashlytics
, update your Fabric
and Crashlytics
versions in your Pods
as:如果您正在使用
Crashlytics
,请将Pods
中的Fabric
和Crashlytics
版本更新为:
pod 'Fabric’, '~> 1.10.2’
pod 'Crashlytics’, '~> 3.14’
And then pod install
.然后
pod install
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.