IOS链接缺少架构i386(AdSupport.framework)

时间:2014-11-03 10:45:20

标签: ios linker ios-simulator i386 build-settings

我有question这个,但现在我更进一步:

我将这个框架添加到我的项目中:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/AdSupport.framework

现在,如果我在任何设备上运行应用程序,这可以正常工作,但是这个框架仅适用于架构armv7,armv7s和arm64

在模拟器上运行应用程序时,构建失败,因为缺少体系结构i386。这包括在:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AdSupport.framework

如何实现可以使用所有架构?我使用构建设置玩了很多但到目前为止没有任何工作!

错误报告:

ld: warning: ignoring file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport, missing required architecture i386 in file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport (3 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
  objc-class-ref in libGoogleAdMobAds.a(GADDevice.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

非常感谢!

2 个答案:

答案 0 :(得分:0)

转到Project Target。并制作如下图所示的架构。enter image description here

答案 1 :(得分:0)

/Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport缺少i386切片;我怀疑它可能是为手臂而不是英特尔而建造的。看起来该框架在您的项目外部,因此我建议您为模拟器重建它。

您可以通过运行file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport

来检查框架的当前体系结构
相关问题