AdMob for iOS error: Llibrary not found for -lGoog

2019-09-01 08:46发布

问题:

I followed the steps to integrate AdMob for my iOS App, everything is ok, but i have one fatal error (so i guess something is not ok)

Here is the message:

Ld /Library/Developer/Xcode/DerivedData/Liga_Zon_Sagres_Companion-fjlwctxjtriqrbgpjiscdoodhcgr/Build/Products/Debug-iphonesimulator/Liga\ Zon\ Sagres\ Companion.app/Liga\ Zon\ Sagres\ Companion normal x86_64
    cd "/Users/bertobettencourt/Desktop/LIVE RELEASES/Liga Zon Sagres (iOS)/1.30"
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/bertobettencourt/Library/Developer/Xcode/DerivedData/Liga_Zon_Sagres_Companion-fjlwctxjtriqrbgpjiscdoodhcgr/Build/Products/Debug-iphonesimulator -L/Users/bertobettencourt/Desktop/LIVE\ RELEASES/Liga\ Zon\ Sagres\ (iOS)/1.30/Liga\ Zon\ Sagres\ Companion/Flurry\ iPhone\ SDK\ viPhone\ 4/Flurry-iOS-4.4.0/Flurry -L/Users/bertobettencourt/Desktop/LIVE\ RELEASES/Liga\ Zon\ Sagres\ (iOS)/1.30/Liga\ Zon\ Sagres\ Companion/Flurry\ iPhone\ SDK\ viPhone\ 4/Flurry-iOS-4.4.0/FlurryAds -F/Users/bertobettencourt/Library/Developer/Xcode/DerivedData/Liga_Zon_Sagres_Companion-fjlwctxjtriqrbgpjiscdoodhcgr/Build/Products/Debug-iphonesimulator -filelist /Users/bertobettencourt/Library/Developer/Xcode/DerivedData/Liga_Zon_Sagres_Companion-fjlwctxjtriqrbgpjiscdoodhcgr/Build/Intermediates/Liga\ Zon\ Sagres\ Companion.build/Debug-iphonesimulator/Liga\ Zon\ Sagres\ Companion.build/Objects-normal/x86_64/Liga\ Zon\ Sagres\ Companion.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework AudioToolbox -framework MessageUI -lFlurry_4.4.0 -framework SystemConfiguration -framework StoreKit -framework CoreData -framework AdSupport -lFlurryAds_4.4.0 -lGoogleAdMobAds -framework iAd -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/bertobettencourt/Library/Developer/Xcode/DerivedData/Liga_Zon_Sagres_Companion-fjlwctxjtriqrbgpjiscdoodhcgr/Build/Intermediates/Liga\ Zon\ Sagres\ Companion.build/Debug-iphonesimulator/Liga\ Zon\ Sagres\ Companion.build/Objects-normal/x86_64/Liga\ Zon\ Sagres\ Companion_dependency_info.dat -o /Users/bertobettencourt/Library/Developer/Xcode/DerivedData/Liga_Zon_Sagres_Companion-fjlwctxjtriqrbgpjiscdoodhcgr/Build/Products/Debug-iphonesimulator/Liga\ Zon\ Sagres\ Companion.app/Liga\ Zon\ Sagres\ Companion

ld: library not found for -lGoogleAdMobAds
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm new to iOS i do not know what is causing this, it seems i am missing the library, any idea where i can find it and how do i fix the problem?

Thank you.

回答1:

You can check my so post here

Go to Project Navigator and find libGoogleAdMobAds.a. Just select it and on right side in Target Membership you would get your targets. Just deselect targets which are selected and again select them.

It may help you.



回答2:

You can add the library to your project by going to your project manager page (click the blue Xcode Project root ("iPhone Test" in this case) in the file browser tab on the left), and under General you should see the 'library' section. If you don't have the library (which I assume you do) it can be downloaded from Google's website.