gpt4 book ai didi

android - 更新后 Google Ads SDK 不推荐使用 InterstitialAd,如何解决?

转载 作者:行者123 更新时间:2023-12-03 16:09:43 27 4
gpt4 key购买 nike

更新后 Google Ads SDK to 19.7.0 提供已弃用的警告消息InterstitialAd , 而我搜索 this link解决问题但没有成功。
我该如何解决?
这是我的代码

public void InterstitialAdmob() {
mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId(Util.ADMOBINTER);
mInterstitialAd.setAdListener(new AdListener() {
@Override
public void onAdClosed() {
requestNewInterstitial();
}
});
requestNewInterstitial();
}

protected void requestNewInterstitial() {
AdRequest adRequest = new AdRequest.Builder().addTestDevice(ADMOBDEV).build();
mInterstitialAd.loadAd(adRequest);
}
// for showing ads
if (mInterstitialAd.isLoaded()) {
mInterstitialAd.show();
}
和开发者网站或建议

最佳答案

在此处查看新的 API 示例:
https://developers.google.com/admob/android/interstitial-fullscreen

Warning: There are many breaking changes coming in version 20.0.0. Version 19.7.0 introduces many new APIs, and deprecates or renames many classes in preparation for version 20.0.0. Please read the migration guide for more details on the changes.


https://developers.google.com/admob/android/migration

关于android - 更新后 Google Ads SDK 不推荐使用 InterstitialAd,如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65880741/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com