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

前端 未结 12 829
春和景丽
春和景丽 2020-12-11 01:19

I created android application and try to add admob to it. but it not works. can anyone help me to fix this error.

[2014-04-09 15:16:51 - Dex Loader] Unable t         


        
相关标签:
12条回答
  • 2020-12-11 01:26

    I had this problem, and this problem too:

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

    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.

    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!

    0 讨论(0)
  • 2020-12-11 01:27

    In my case the problem occured when i moved to firebase.

    The problem dissappeared when removing old "GoogleAdMobAdsSdk" sdk from "app\libs" folder.

    0 讨论(0)
  • 2020-12-11 01:32

    Remove google play service plugin by writing cordova plugin remove com.google.playservices and add the cordova admob plugin by writing cordova plugin add [your admob plugin name] .

    0 讨论(0)
  • 2020-12-11 01:37

    You have imported google-play-services and used as library. you've also added google-play-services external jar files. So ambiguity. Do not use google-play-services as library.

    0 讨论(0)
  • 2020-12-11 01:37

    select project Rigth click on project--> Build Path --> Configure Build path--> Select libraries-->uncheck googleplaylib, and clean. and run, i hope it will work, I can solve my problem using this method. Try

    0 讨论(0)
  • 2020-12-11 01:38

    I had this error.

    Make sure google-play-service.jar is not added twice (even in different modules...as in my case). It takes long time to debug those bugs.

    0 讨论(0)
提交回复
热议问题