如何一起使用adMob和(谷歌地图api)谷歌播放服务? [英] How to use adMob and (google map api)google play service together?
问题描述
我在adMod横幅广告的市场上推出了一款应用,现在我正在尝试为我的应用添加一些Google Maps API。
我知道如何处理adMobs库或Google Maps API分开。但是,当我尝试使用adMob和Google Maps API(Google Play服务)运行应用程序时,似乎他们遇到了碰撞或类似情况。或者google-play-services.jar和GoogleAdMobAdsSdk.jar具有相同的AdMob类名。可能是由于这个原因,我得到了多个.dex文件。我的控制台出现错误:
麻烦写出输出:已经准备好了[2014-05-18 18:24:40 - Dex Loader]无法执行dex:多个dex文件定义了Lcom / google / ads / AdRequest $ ErrorCode; [2014-05-18 18:24:40 - WorkC 3.0.9 actionBar]转换为Dalvik格式失败:无法执行dex:多个dex文件定义了Lcom / google / ads / AdRequest $ ErrorCode;
只要我更新应用程序版本,恐怕对我的adMob不利。如何解决这个问题?
移动广告现已成为Google Play服务的一部分,因此现在很多类名都是重复的。请参阅此处的迁移指南。
I have an app on the market with adMod banner, and now I am trying to add some Google Maps api to my application.
I know how to handle adMobs library or Google Maps api separately. But when I try to run the app with adMob and Google Maps api (Google Play service), it seems they have a collision or something like that. Or google-play-services.jar and GoogleAdMobAdsSdk.jar have the same class name for AdMob. Maybe due to that reason I am getting multiple .dex files.
My error on my console is:
trouble writing output: already prepared [2014-05-18 18:24:40 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode; [2014-05-18 18:24:40 - WorkC 3.0.9 actionBar] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode;
I'm afraid it would be bad to my adMob as soon as I update the application version. How can I fix that?
Mobile Ads is now a part of Google Play Services, hence a lot of class names are duplicated now. See the migration guide here.
这篇关于如何一起使用adMob和(谷歌地图api)谷歌播放服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!