Zippy
Zippy

Reputation: 3887

Eclipse/Android, MoPub with Admob Adapters

I've been (unsuccessfully) attempting to add the AdMob Adapters to my MoPub integration for the past few days.

Specifically, what has been tripping me up is this quote on various MoPub support pages:

Copy the GooglePlayServicesBanner and GooglePlayServicesInterstitial classes into the com.mopub.mobileads package of your application’s src/ directory.

Now by 'your application' I would assume it to mean my actual project - not the mopub-sdk that it asked me to import.

However, my app doesn't have this com.mopub.mobileads, so I can't copy these files here. It made sense to me that maybe, I should be copying these 2 files into the mopub-sdk project that I imported as this does have com.mopub.mobileads. And I've just come across this page: which states:

The banner and interstitial adapters (e.g. GooglePlayServicesBanner.java and GooglePlayServicesInterstitial.java) should be placed in the com/mopub/mobileads folder in the MoPub SDK.

I realise the above is probably not meant for Elcipse, however....

Does anyone know where these adapters should actually go (when using Eclipse)?

Tried it

If I do copy them into the mopub-sdk project, I get errors because these 2 files reference Google Play Services and the mopub-sdk doesn't have the google-play-services.lib added as a library. My probject obviously does as I'm using it for Leaderboards/Google Ads.

There is no mention (that I can see) anywhere on any MoPub site about these errors and whether I should also add google-play-services-lib as a library to the mopub-sdk project in Eclipse.

What can I do (apart from also adding the google-play-services-lib as a library to the mopub-sdk project in Eclipse), to give Eclipse access to google-play-services.lib? Is there some trick to it?

Here are some screen shots to illustrate what I'm talking about:

enter image description here

^^ Is this the correct place for these files?^^

enter image description here

^^mopub-sdk libraries^^

enter image description here

^^my projects libraries^^

Upvotes: 1

Views: 97

Answers (1)

William
William

Reputation: 20196

I would create the com.mopub.mobileads package in your app and copy the 2 Java files there.

Upvotes: 0

Related Questions