ClassNotFoundException: Didn't find class “com.google.android.gms.ads.AdView”

前端 未结 3 812
花落未央
花落未央 2020-11-27 07:56

I did a lot of research and this seems to be a common error for many users but for very different reasons. None of which I found worked for me.

I\'m getting

3条回答
  •  自闭症患者
    2020-11-27 08:33

    This because ProGuard. To safely use ProGuard with Google Mobile Ads, add the following to your ProGuard config:

    -keep public class com.google.android.gms.ads.** {
       public *;
    }
    
    -keep public class com.google.ads.** {
       public *;
    }
    

提交回复
热议问题