我的android应用中的广告与此代码和实施'com.google.android.gms:play-services-ads:18.3.0'配合正常:
MobileAds.initialize(this, MY_ID);
AdView adview = (AdView) findViewById(R.id.adView);
AdRequest.Builder().addTestDeviceMY_PHONE")).build());
但是一旦我升级到实施'com.google.android.gms:play-services-ads:19.3.0':
MobileAds.initialize(this, new OnInitializationCompleteListener() {
@Override
public void onInitializationComplete(InitializationStatus initializationStatus) {
Log.e("CVE","onInitializationComplete");
}
});
AdView mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
mAdView.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {
Log.e("CVE","AD gms.ads onAdLoaded");
}
@Override
public void onAdFailedToLoad(LoadAdError adError) {
Log.e("CVE","AD gms.ads onAdFailedToLoad "+adError.getMessage());
}
@Override
public void onAdOpened() {
Log.e("CVE","AD gms.ads onAdOpened");
}
@Override
public void onAdClicked() {
Log.e("CVE","AD gms.ads onAdClicked");
}
@Override
public void onAdLeftApplication() {
// Code to be executed when the user has left the app.
}
@Override
public void onAdClosed() {
// Code to be executed when the user is about to return
// to the app after tapping on an ad.
}
});
广告没有显示,我收到了以下消息:
AD gms.ads onAdFailedToLoad内部错误。
由于内部错误并没有真正的帮助,所以我真的需要帮助。
谢谢。