Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 缺少的文件需要在模拟器上使用架构i386和x86_64,但在设备上工作正常_Ios - Fatal编程技术网

Ios 缺少的文件需要在模拟器上使用架构i386和x86_64,但在设备上工作正常

Ios 缺少的文件需要在模拟器上使用架构i386和x86_64,但在设备上工作正常,ios,Ios,我添加了TurnOutNow库,其中包含EASDK.h和libEventAnalytics.a 我的项目和TurnOutNow库具有reachability.m文件 因此,它在构建时出现了以下错误: duplicate symbol _OBJC_METACLASS_$_Reachability in: /Users/achavan/Library/Developer/Xcode/DerivedData/Meeting_Caddie-bbzedidjjyellubhnftrohiumzog/Bui

我添加了TurnOutNow库,其中包含EASDK.h和libEventAnalytics.a

我的项目和TurnOutNow库具有reachability.m文件

因此,它在构建时出现了以下错误:

duplicate symbol _OBJC_METACLASS_$_Reachability in: /Users/achavan/Library/Developer/Xcode/DerivedData/Meeting_Caddie-bbzedidjjyellubhnftrohiumzog/Build/Intermediates/Meeting Caddie.build/Debug-iphoneos/Meeting Caddie.build/Objects-normal/armv7/Reachability.o /Work_Theme_iPhone/New M_Caddie/Eventpedia_Beta/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a(Reachability.o) ld: 2 duplicate symbols for architecture armv7
我搜索了stackoverflow,发现从构建阶段删除reachability.m是可行的

但它给出了以下错误:

(null): "_kReachabilityChangedNotification", referenced from:

(null): -[AppDelegate setUpRechability] in AppDelegate.o

(null): +[ASIHTTPRequest registerForNetworkReachabilityNotifications] in ASIHTTPRequest.o

(null): +[ASIHTTPRequest unsubscribeFromNetworkReachabilityNotifications] in ASIHTTPRequest.o

(null): Symbol(s) not found for architecture arm64

(null): Linker command failed with exit code 1 (use -v to see invocation)
要解决这个问题: 我重新命名了可达性类。 它在设备上工作正常。 但当我在IOS模拟器上构建时,它给出了以下错误

1. ld: warning: ignoring file /Work_Theme_iPhone/New M_Caddie/MeetingCaddie/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a, missing required architecture i386 in file /Work_Theme_iPhone/New M_Caddie/MeetingCaddie/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a (2 slices)
_OBJC_类$_EASDK,引用自:

2. (null): Ignoring file /Work_Theme_iPhone/New M_Caddie/MeetingCaddie/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a, missing required architecture x86_64 in file /Work_Theme_iPhone/New M_Caddie/MeetingCaddie/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a (2 slices)
null:_OBJC_CLASS_$_EASDK,引用自:

2. (null): Ignoring file /Work_Theme_iPhone/New M_Caddie/MeetingCaddie/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a, missing required architecture x86_64 in file /Work_Theme_iPhone/New M_Caddie/MeetingCaddie/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a (2 slices)
EASDK是TurnoutNow库中的一个文件


感谢您的帮助。

在浏览了几个链接后,我发现

i386 = ios simulator or 32 bit build on mac os x
armv6 armv7 arm7s = ios device
x86_64 = 64 bit build on mac os x
当我运行以下命令时: libEventAnalytics.a用于架构cputype 16777228 cpusubtype 0:当前ar存档随机库 Amits Mac mini:TurnOutNow_SDK achavan$lipo-info libEventAnalytics.a fat文件中的架构:libEventAnalytics.a是:armv7 arm64

我发现libEventAnalytics.a不是为i386和x86_64构建的。
所以我无法在模拟器上运行我的应用程序。

我要做的第一件事是清理project Product->clean。如果这没有帮助的话,可能是libEventsAnalytics.a不是为i386体系结构构建的,您在那里做不了什么。谢谢您的回复。但它是在设备上工作,而不是在模拟器上。我检查了libEventsAnalytics.a是否与lipo-info的体系结构兼容,上面写着armv7和arm64。