2016-09-25 79 views
1

我的iOS应用程序能够在模拟器上正常运行,但是当我尝试对其进行存档时,出现以下错误。Admob导致链接器命令失败,退出代码1错误

ld: library not found for -lPods-MOEDict-Google-Mobile-Ads-SDK 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

这是我的其他连接器选项:

-ObjC -l"Pods-MOEDict-Google-Mobile-Ads-SDK" -framework "AVFoundation" 
    -framework "AudioToolbox" -framework "CoreGraphics" -framework "CoreTelephony" -framework "EventKit" -framework "EventKitUI" 
-framework "GoogleMobileAds" -framework "MessageUI" -framework "StoreKit" -framework "SystemConfiguration" -weak_framework "AdSupport" $(inherited) 
+0

1.你打开项目或xcworkspace?确保xcworkspace已打开。 2.选择广告sdk target来纠正项目。 3.在谷歌教程中添加库提到链接失败的另一个原因是复制库到项目没有被选中。 –

+0

是的,我打开xcworkspace。我的应用和广告在模拟器上正常运行。但是当我试图将它存档为应用程序的发布时,我得到了这个错误。 – user2872856

+0

检查此链接http://stackoverflow.com/questions/22800793/ld-library-not-found-for-lgoogleadmobads/22801813#22801813 –

回答

3

解决自己我删除整个other linker flags的问题,并与$(inherited)

1

如果你正在使用的CocoaPods不管理舱体取代它手动。

尝试运行如下命令:

// Removes every trace of cocoapods from the xcode project 
pod deintegrate 
// Reinstalls and links cocoapods (probably gonna fix the missing framework) 
pod install 
相关问题