build error when add Admob in iOS app

老子叫甜甜 提交于 2019-12-02 07:59:13

问题


I tried lots of source code and many questions here but no solution is working for me. When I tried to add admob to my existing project I got the following error in Xcode, please see the screenshot :

I have all frameworks such as store kit and others. See the second screenshot :

I have added iAd network without any problems, but I'm unable to add admob. Please help

In case the image is not clear please see the error text here :

ld: warning: directory not found for option '-L/Users/hussainbarakat/Desktop/ARSSReader21-1-2013 copy1/../../Documents/GoogleAdMobAdsSdkiOS-6.3.0/Add-ons/GoogleAnalyticsiOS_2.0beta4/Library' ld: warning: directory not found for option '-L/Users/hussainbarakat/Desktop/ARSSReader21-1-2013 copy1/../../Documents/GoogleAdMobAdsSdkiOS-6.3.0' ld: warning: ignoring file /Users/hussainbarakat/Desktop/ARSSReader21-1-2013 copy1/StoreKit.framework/StoreKit, missing required architecture i386 in file /Users/hussainbarakat/Desktop/ARSSReader21-1-2013 copy1/StoreKit.framework/StoreKit (2 slices) Undefined symbols for architecture i386: "_OBJC_CLASS_$_SKStoreProductViewController", referenced from: objc-class-ref in libGoogleAdMobAds.a(GADOpener.o) "_SKStoreProductParameterITunesItemIdentifier", referenced from: -[GADOpener openInAppStore:fallbackURLString:] in libGoogleAdMobAds.a(GADOpener.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)


回答1:


Finally I found the solution !! The problem is with Storekit Framework, I had dragged this frame from into my project from previous time, so when I deleted this framework, & then add it again from build setting > Build phases , then add the StoreKit frame work, the error is gone.




回答2:


follow this tutorial

And make ADSupport.framework optional

download libAdapterId,a form here https://dl.google.com/dl/googleadmobadssdk/libadapteriad.zip Do net set translatesAutoresizingMaskIntoConstraints property. It is supported for iOS6 and later



来源:https://stackoverflow.com/questions/15642180/build-error-when-add-admob-in-ios-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!