Dibo
Dibo

Reputation: 1189

GoogleAdView - can't install in Eclipse

I'm confused with advertisements in android application. There is Adsense, AdMob, AdWhirl... Which should I use to show ads in my android application? Somwhere I read that Adsense is in beta, somewhere that Admob is deprecated and should use Adsense, and somewhere that I should use Admob because it is rewritten and is using Adsense background now.

So I finally use this solution: https://developers.google.com/adsense-for-mobile-apps/docs/android/?hl=pl

But can't find link to GoogleAdView.jar (I have sdk android-sdk_r18-linux). So I downloaded from: http://www.java2s.com/Code/Jar/g/DownloadGoogleAdViewjar.htm . I created folder "libs" in my project, and added it in project properties -> java build path -> libraries -> Add external jar. I clean up project. Java code is compiling but layout preview can't load this control, I get error "The following classes could not be instantiated: com.google.ads.GoogleAdView". But when I run my application on emulator, I see ad and when I send my app to friend, he see it on his smartphone too.

So my questions are: 1. Is this tutorial current? 2. Why eclipse doesn't load GoogleAdView in layout preview?

Regards

Upvotes: 0

Views: 192

Answers (1)

codejammer
codejammer

Reputation: 1676

  1. No the current way to do it is to use the AdMob SDK https://developers.google.com/mobile-ads-sdk/
  2. Here is the answer from google product forums for the xml view part http://productforums.google.com/forum/#!category-topic/adsense/i-have-an-active-account-working-with-adsense/295ohH_m8jc

Upvotes: 1

Related Questions