- AdColony, Unity Ads는 추가해도 빌드에 문제발생하지 않음
- Facebook, InMobi는 각각 따로 추가해도 빌드에러 발생
-
대략 이런에러.
Dex: Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/customtabs/ICustomTabsCallback$Stub$Proxy;
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/customtabs/ICustomTabsCallback$Stub$Proxy;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:661)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:616)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:598)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:198)
at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:61)
at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:36)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformDexArchiveWithDexMergerForDebug'.
> com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Landroid/support/customtabs/ICustomTabsCallback$Stub$Proxy;
Assets\GoogleMobileAds\Editor\InMobiMediationDependencies.xml
<dependencies>
<androidPackages>
<androidPackage spec="com.google.ads.mediation:inmobi:7.2.9.0">
<repositories>
<repository>https://jcenter.bintray.com/</repository>
</repositories>
</androidPackage>
</androidPackages>
<iosPods>
<iosPod name="GoogleMobileAdsMediationInMobi" version="7.3.2.0">
<sources>
<source>https://github.com/CocoaPods/Specs</source>
</sources>
</iosPod>
</iosPods>
</dependencies>
-
- 대충 내용을 보면 동일한 android 코드가 중복되어서 빌드된 것.
- Firebase, Google Play service, facebook, AppsFlyer, adob, mediation..... 중복될만 하다.
- InMobi 수정
- 위 로그 하단에 보면 InMobiMediationDependencies.xml이 언급된다.
-
https://jcenter.bintray.com/ 에서 "com.google.ads.mediation:inmobi:7.2.9.0" 이 패키지가 depencencies 걸려있어서 읽어오려고 한다.
-
그곳엔 뭐가 있을까? https://jcenter.bintray.com/com/google/ads/mediation/inmobi/7.2.9.0/ 접속해본다.
- inmobi-7.2.9.0.pom 이 파일을 확인해보면 dependencies가 꽤나 많이 걸려있다. 분명 이런것들이 다른 플러그인과 중복됐을꺼다.
- com.google.ads.mediation:inmobi:7.2.7.0을 확인해본다.
- pom파일을 보면 dependencies가 없다. 깔끔!
- Assets\GoogleMobileAds\Editor\InMobiMediationDependencies.xml 수정.
- <androidPackage spec="com.google.ads.mediation:inmobi:7.2.9.0"> → <androidPackage spec="com.google.ads.mediation:inmobi:7.2.7.0">
- 빌드 성공!
-
- 위 로그 하단에 보면 InMobiMediationDependencies.xml이 언급된다.
- Facebook 수정.
- InMobi와 마찬가지로 https://jcenter.bintray.com/com/google/ads/mediation/facebook 을 확인.
- 여기도 dependencies가 걸려있다.
- 보아하니 <groupId>com.google.android.gms</groupId> 이놈이 문제인듯.
- Google Play Service와 충돌나는 듯 하다.
- Assets\GoogleMobileAds\Editor\FacebookMediationDependencies.xml 수정.
- <androidPackage spec="com.google.ads.mediation:facebook:5.5.0.0"> → <androidPackage spec="com.google.ads.mediation:facebook:5.3.1.2">
- 역시 빌드 성공!
- InMobi와 마찬가지로 https://jcenter.bintray.com/com/google/ads/mediation/facebook 을 확인.
카테고리 없음