iOS 常见错误总结

时间:2021-7-21 作者:qvyue

1.error: The linked library ‘libPods-Owner.a’ is missing one or more architectures required by this target: arm64. (in target ‘Owner’ from project ‘Owner’)

解决方法:在TARGETS-Build Settings-Excluded Architectures中添加以下代码

EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64= arm64 arm64e armv7 armv7s armv6 armv8 EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))
iOS 常见错误总结
添加后详细内容如上图

以上操作会导致项目不能真机运行:Unable to install “App Name”

iOS 常见错误总结
Unable to install “App Name”
Details

Unable to install "App Name"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620415
--
An unknown error has occurred.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620415
User Info: {
    DVTRadarComponentKey = 280331;
    MobileDeviceErrorCode = "(0xE8008001)";
    "com.apple.dtdevicekit.stacktrace" = (
 0   DTDeviceKitBase                     0x0000000120f2d99f DTDKCreateNSErrorFromAMDErrorCode + 220
 1   DTDeviceKitBase                     0x0000000120f6c164 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
 2   DVTFoundation                       0x0000000102f63993 DVTInvokeWithStrongOwnership + 71
 3   DTDeviceKitBase                     0x0000000120f6bea5 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
 4   IDEiOSSupportCore                   0x0000000120ddc7bc __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.292 + 3513
 5   DVTFoundation                       0x00000001030922ae __DVT_CALLING_CLIENT_BLOCK__ + 7
 6   DVTFoundation                       0x0000000103093ed0 __DVTDispatchAsync_block_invoke + 1191
 7   libdispatch.dylib                   0x00007fff201775dd _dispatch_call_block_and_release + 12
 8   libdispatch.dylib                   0x00007fff201787c7 _dispatch_client_callout + 8
 9   libdispatch.dylib                   0x00007fff2017e5fe _dispatch_lane_serial_drain + 606
 10  libdispatch.dylib                   0x00007fff2017f0cb _dispatch_lane_invoke + 375
 11  libdispatch.dylib                   0x00007fff20188c5d _dispatch_workloop_worker_thread + 819
 12  libsystem_pthread.dylib             0x00007fff20320499 _pthread_wqthread + 314
 13  libsystem_pthread.dylib             0x00007fff2031f467 start_wqthread + 15
);
}
--


System Information

macOS Version 11.0.1 (Build 20B29)
Xcode 12.2 (17535) (Build 12B45b)
Timestamp: 2020-12-10T10:08:10+08:00

解决方法,删除上面配置信息,但是这样子会导致还是不能虚拟机运行。

最终的解决方法:

iOS 常见错误总结
最终解决方法

只输入arm64就能完美解决。
之后又发现在低版本的Xcode中,因为有arm64,所有会报错:The file “App Name” couldn’t be opened because you don’t have permission to view it.

iOS 常见错误总结
无法安装

解决办法:删除Valid Architectures中的arm64

实际上出现这个问题本身就很奇怪,就是高低版本Xcode之间的问题。
有人会问,为什么你中间多写这么多废话,在这里我记录过程,就是为了更好的帮助理解以及帮助那些遇到中间过程错误的码友。

声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:qvyue@qq.com 进行举报,并提供相关证据,工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。