I am attempting to incorporate admob ads in my app. So far I have added the following code in the onCreate method of my app\'s main activity...
adView =
In my case I needed to click on the "Android Private Libraries" on the "Order and Export" Tab
See this answer Android update 17 seems incompatible with external Jars.
You need to put all jars in libs folder insted of lib.
Go to Properties - Java Build Path - Order and Export and check every Checkmark! That did the trick for my project.
Was getting this error updating from android 16 to 20.
Solved by going to Java Build Path, Order and Export tab, checked and moved GoogleAdMobAdsSdk just under my source. For some reason that fixed it.
Changing the order back didn't break it. So some setting must have needed to be initialized.
I had this problem, and this problem too:
Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode and Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode
Despite many hours of following all solutions listed the only way I could get my app to work was to use the AdMob banner example here:
https://github.com/googleads/googleads-mobile-ios-examples/tree/master/admob/SmartBannerExample
And re-build my project around it, copying my files in to that project. If you are stuck, try it.
Don't know why it worked, but now it does. Something in my project was very wrong. Now I can carry on with my work. I love Google/Android, but really what a mess!
UPDATE:
Select project settings > Java Build Path, then Order and export.
Here, check the google-play-services.jar.
This should solve the NoClassDefFoundError-issue.