Hi. I am trying to include Amazon ad banners in my Android App. I am following the
QuickStart Guide (https://developer.amazon.com/docs/mobile-ads/mb-quick-start.html).
After setting the App Key, I initialize the adView variable:
this.adView = (AdLayout) findViewById(R.id.adview);
but the variable adView turns red with the warning: Cannot resolve symbol
So, guessing that the type of this adView variable is: com.amazon.device.ads.AdLayout,
I implement instead:
com.amazon.device.ads.AdLayout adView = (AdLayout) findViewById(R.id.adview); AdTargetingOptions adOptions = new AdTargetingOptions();
But if I run the code, I get: NullPointerException in:
It seems that they have been correctly instantiated, so what am I missing here?
By the way, they recommend to include the Google Play Services SDK, but the specific Google site doesn't actually specify which libraries we should add. And adding all the Play libraries seems inconvenient. I guess that they implicitly suggest to install the Play library to run Google Mobile Ads (
Can you point me to a basic Android APP that actually runs Amazon banners, so I can guesstimate what is not working with my own App? Thanks