java.lang.NoClassDefFoundError: com.google.ads.AdView

前端 未结 10 1021
面向向阳花
面向向阳花 2020-11-28 13:42

I am attempting to incorporate admob ads in my app. So far I have added the following code in the onCreate method of my app\'s main activity...

    adView =          


        
10条回答
  •  感动是毒
    2020-11-28 14:15

    I had this problem, and this problem too:

    Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode and Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode

    Despite many hours of following all solutions listed the only way I could get my app to work was to use the AdMob banner example here:

    https://github.com/googleads/googleads-mobile-ios-examples/tree/master/admob/SmartBannerExample

    And re-build my project around it, copying my files in to that project. If you are stuck, try it.

    Don't know why it worked, but now it does. Something in my project was very wrong. Now I can carry on with my work. I love Google/Android, but really what a mess!

提交回复
热议问题