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

时间:2015-03-26 06:53:20

标签: ios

我添加了包含EASDK.h和libEventAnalytics.a的TurnOutNow库

我的项目& 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_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)

(null):“_ OBJC_CLASS _ $ _ EASDK”,引自:

EASDK是TurnoutNow库中的一个文件。

任何帮助表示感谢。

1 个答案:

答案 0 :(得分:0)

在找到几个链接之后,我发现了

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 胖文件中的体系结构:libEventAnalytics.a是:armv7 arm64

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