My application integrates Mopub Ads sdk. I created an account on Mopub and got AdUnitId for my application.
I followed all the steps mentioned in the mopub tutorial, although the steps were very simple, I was not able to show ads in my application. I always get the following logs:
D/MoPub(2393): MoPub server returned invalid response. I/MoPub(2393): Ad failed to load.
Here is my code to download the banner ad:
MoPubView mAdView = (MoPubView) findViewById(R.id.adview); mAdView.setAdUnitId("xxxxxxxxxxxxxx"); mAdView.loadAd(); mAdView.setOnAdLoadedListener(new OnAdLoadedListener() { public void OnAdLoaded(MoPubView mpv) { Toast.makeText(getApplicationContext(), "Ad loaded!!!", Toast.LENGTH_SHORT).show(); } });
Note. I have not added payment data to the Mopub server yet. Could this be a likely cause. But I think that the payment data has nothing to do with the above exception.
Any help would be appreciated.
N-joy
source share