【问题标题】:Fix android studio Firebase Ads Library showing errors after update修复更新后显示错误的 android studio Firebase 广告库
【发布时间】:2021-08-10 18:50:31
【问题描述】:

更新以下 Firebase 广告库后

implementation 'com.google.android.gms:play-services-ads:20.1.0'
implementation 'com.google.firebase:firebase-ads:20.1.0'

我的 android studio 项目不断抛出诸如此类的错误

 cannot find symbol
 import com.google.android.gms.ads.InterstitialAd;

 Cannot resolve symbol 'InterstitialAd'

如果我恢复到就好了

implementation 'com.google.android.gms:play-services-ads:19.3.0'
implementation 'com.google.firebase:firebase-ads:19.4.0'

但要在我的应用中实现一些功能和原生广告,我需要最新的 firebase 广告库。我该如何解决这个问题?

【问题讨论】:

    标签: android android-studio interstitial


    【解决方案1】:

    在版本 20 中,类已更改。用这个;

    com.google.android.gms.ads.interstitial.InterstitialAd;

    查看更多详情here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-28
      • 2022-01-19
      • 2017-07-23
      • 1970-01-01
      • 2017-07-27
      • 1970-01-01
      • 1970-01-01
      • 2022-12-09
      相关资源
      最近更新 更多