简体   繁体   中英

build error when add Admob in iOS app

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)

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM