与Admob和Google Play服务冲突的团结

时间:2017-09-19 20:19:34

标签: android unity3d admob google-play-services unity5

我有一个添加了Google Play服务的Unity项目。在我添加AdMob之前,一切正常。现在我收到以下错误。我已经检查了重复的aar文件,但我找不到任何文件。 (文件列表也在下面。)我也尝试删除Temp文件夹并重新导入Unity Editor中的所有内容,也没有任何运气。

CommandInvokationFailure: Unable to convert classes into dex format.
C:/Program Files/Java/jdk1.8.0_144\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/jakab/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzut;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzuu;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzuv;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzuw;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzux;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzuy;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzuz;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzva;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzvb;

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:615)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:313)
    at com.android.dx.command.dexer.Main.runDx(Main.java:291)
    at com.android.dx.command.dexer.Main.main(Main.java:247)
    at com.android.dx.command.Main.main(Main.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at SDKMain.main(SDKMain.java:130)
Caused by: java.lang.InterruptedException: Too many errors
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:607)
    ... 9 more
]
stdout[
processing archive C:\Developing\Unity\Game\Temp\StagingArea\android-libraries\play-services-ads-11.2.2\libs\.\classes.jar...
ignored resource META-INF/
ignored resource META-INF/MANIFEST.MF
ignored resource com/
ignored resource com/google/
ignored resource com/google/android/
ignored resource com/google/android/gms/
ignored resource com/google/android/gms/ads/
ignored resource com/google/android/gms/ads/internal/
processing com/google/android/gms/ads/internal/ClientApi.class...
ignored resource com/google/android/gms/ads/internal/js/
processing com/google/android/gms/ads/internal/js/JavascriptEngineFactory.class...
processing com/google/android/gms/ads/internal/js/JavascriptEngineFactory$JSEngineSettableFuture.class...
processing com/google/android/gms/ads/internal/js/zza.class...
processing com/google/android/gms/ads/internal/js/zzaa.class...
processing com/google/android/gms/ads/internal/js/zzab.class...
processing com/google/android/gms/ads/internal/js/zzac.class...
processing com/google/android/gms/ads/internal/js/zzad.class...
processing com/google/android/gms/ads/internal/js/zzae.class...
processing com/google/android/gms/ads/internal/js/zzaf.class...
processing com/google/android/gms/ads/internal/js/zzag.class...
processing com/google/android/gms/ads/internal/js/zzah.class...
processing com/google/android/gms/ads/internal/js/zzai.class...
processing com/google/android/gms/ads/internal/js/zzaj.class...
processing com/google/android/gms/ads/internal/js/zzak.class...
processing com/google/android/gms/ads/internal/js/zzb.class...
processing com/google/android/gms/ads/internal/js/zzc.class...
processing com/google/android/gms/ads/internal/js/zzd.class...
processing com/google/android/gms/ads/internal/js/zze.class...
processing com/google/android/gms/ads/internal/js/zzf.class...
processing com/google/android/gms/ads/internal/js/zzg.class...
processing com/google/android/gms/ads/internal/js/zzh.class...
processing com/google/android/gms/ads/internal/js/zzi.class...
processing com/google/android/gms/ads/internal/js/zzj.class...
processing com/google/android/gms/ads/internal/js/zzk.class...
processing com/google/android/gms/ads/internal/js/zzl.class...
processing com/google/android/gms/ads/internal/js/zzm.class...
processing com/google/android/gms/ads/internal/js/zzn.class...
processing com/google/android/gms/ads/internal/js/zzo.class...
processing com/google/android/gms/ads/internal/js/zzp.class...
processing com/google/android/gms/ads/internal/js/zzq.class...
processing com/google/android/gms/ads/internal/js/zzr.class...
processing com/google/android/gms/ads/internal/js/zzs.class...
processing com/google/android/gms/ads/internal/js/zzt.class...
processing com/google/android/gms/ads/internal/js/zzu.class...
processing com/google/android/gms/ads/internal/js/zzv.class...
processing com/google/android/gms/ads/internal/js/zzw.class...
processing com/google/android/gms/ads/internal/js/zzx.class...
processing com/google/android/gms/ads/internal/js/zzy.class...
processing com/google/android/gms/ads/internal/js/zzz.class...
ignored resource com/google/android/gms/ads/internal/overlay/
processing com/google/android/gms/ads/internal/overlay/AdOverlayInfoParcel.class...
processing com/google/android/gms/ads/internal/overlay/zza.class...
processing com/google/android/gms/ads/internal/overlay/zzaa.class...
processing com/google/android/gms/ads/internal/overlay/zzab.class...
processing com/google/android/gms/ads/internal/overlay/zzac.class...
processing com/google/android/gms/ads/internal/overlay/zzad.class...
processing com/google/android/gms/ads/internal/overlay/zzae.class...
processing com/google/android/gms/ads/internal/overlay/zzaf.class...
processing com/google/android/gms/ads/internal/overlay/zzag.class...
processing com/google/android/gms/ads/internal/overlay/zzaj.class...
processing com/google/android/gms/ads/internal/overlay/zzak.class...
processing com/google/android/gms/ads/internal/overlay/zzal.class...
processing com/google/android/gms/ads/internal/overlay/zzam.class...
processing com/google/android/gms/ads/internal/overlay/zzan.class...
processing com/google/android/gms/ads/internal/overlay/zzao.class...
processing com/google/android/gms/ads/internal/overlay/zzap.class...
processing com/google/android/gms/ads/internal/overlay/zzaq.class...
processing com/google/android/gms/ads/internal/overlay/zzar.class...
processing com/google/android/gms/ads/internal/overlay/zzas.class...
processing com/google/android/gms/ads/internal/overlay/zzat.class...
processing com/google/android/gms/ads/internal/overlay/zzau.class...
processing com/google/android/gms/ads/internal/overlay/zzb.class...
processing com/google/android/gms/ads/internal/overlay/zzc.class...
processing com/google/android/gms/ads/internal/overlay/zzd.class...
processing com/google/android/gms/ads/internal/overlay/zze.class...
processing com/google/android/gms/ads/internal/overlay/zzf.class...
processing com/google/android/gms/ads/internal/overlay/zzg.class...
processing com/google/android/gms/ads/internal/overlay/zzh.class...
processing com/google/android/gms/ads/internal/overlay/zzi.class...
processing com/google/android/gms/ads/internal/overlay/zzj.class...
processing com/google/android/gms/ads/internal/overlay/zzk.class...
processing com/google/android/gms/ads/internal/overlay/zzl.class...
processing com/google/android/gms/ads/internal/overlay/zzm.class...
processing com/google/android/gms/ads/internal/overlay/zzn.class...
processing com/google/android/gms/ads/internal/overlay/zzo.class...
processing com/google/android/gms/ads/internal/overlay/zzp.class...
processing com/google/android/gms/ads/internal/overlay/zzq.class...
processing com/google/android/gms/ads/internal/overlay/zzr.class...
processing com/google/android/gms/ads/internal/overlay/zzs.class...
processing com/google/android/gms/ads/internal/overlay/zzt.class...
processing com/google/android/gms/ads/internal/overlay/zzu.class...
processing com/google/android/gms/ads/internal/overlay/zzv.class...
processing com/google/android/gms/ads/internal/overlay/zzw.class...
processing com/google/android/gms/ads/internal/overlay/zzx.class...
processing com/google/android/gms/ads/internal/overlay/zzy.class...
processing com/google/android/gms/ads/internal/overlay/zzz.class...
processing com/google/android/gms/ads/internal/zza.class...
processing com/google/android/gms/ads/internal/zzaa.class...
processing com/google/android/gms/ads/internal/zzab.class...
processing com/google/android/gms/ads/internal/zzac.class...
processing com/google/android/gms/ads/internal/zzad.class...
processing com/google/android/gms/ads/internal/zzae.class...
processing com/google/android/gms/ads/internal/zzaf.class...
processing com/google/android/gms/ads/internal/zzag.class...
processing com/google/android/gms/ads/internal/zzah.class...
processing com/google/android/gms/ads/internal/zzai.class...
processing com/google/android/gms/ads/internal/zzaj.class...
processing com/google/android/gms/ads/internal/zzak.class...
processing com/google/android/gms/ads/internal/zzal.class...
processing com/google/android/gms/ads/internal/zzam.class...
processing com/google/android/gms/ads/internal/zzan.class...
processing com/google/android/gms/ads/internal/zzao.class...
processing com/google/android/gms/ads/internal/zzap.class...
processing com/google/android/gms/ads/internal/zzaq.class...
processing com/google/android/gms/ads/internal/zzar.class...
processing com/google/android/gms/ads/internal/zzas.class...
processing com/google/android/gms/ads/internal/zzat.class...
processing com/google/android/gms/ads/internal/zzau.class...
processing com/google/android/gms/ads/internal/zzav.class...
processing com/google/android/gms/ads/internal/zzaw.class...
processing com/google/android/gms/ads/internal/zzax.class...
processing com/google/android/gms/ads/internal/zzay.class...
processing com/google/android/gms/ads/internal/zzaz.class...
processing com/google/android/gms/ads/internal/zzb.class...
processing com/google/android/gms/ads/internal/zzba.class...
processing com/google/android/gms/ads/internal/zzbb.class...
processing com/google/android/gms/ads/internal/zzbc.class...
processing com/google/android/gms/ads/internal/zzbd.class...
processing com/google/android/gms/ads/internal/zzbe.class...
processing com/google/android/gms/ads/internal/zzbf.class...
processing com/google/android/gms/ads/internal/zzbg.class...
processing com/google/android/gms/ads/internal/zzbh.class...
processing com/google/android/gms/ads/internal/zzbi.class...
processing com/google/android/gms/ads/internal/zzbj.class...
processing com/google/android/gms/ads/internal/zzbk.class...
processing com/google/android/gms/ads/internal/zzbl.class...
processing com/google/android/gms/ads/internal/zzbm.class...
processing com/google/android/gms/ads/internal/zzbn.class...
processing com/google/android/gms/ads/internal/zzbo.class...
processing com/google/android/gms/ads/internal/zzbp.class...
processing com/google/android/gms/ads/internal/zzbq.class...
processing com/google/android/gms/ads/internal/zzbr.class...
processing com/google/android/gms/ads/internal/zzbs.class...
processing com/google/android/gms/ads/internal/zzbt.class...
processing com/google/android/gms/ads/internal/zzbu.class...
processing com/google/android/gms/ads/internal/zzbv.class...
processing com/google/android/gms/ads/internal/zzbw.class...
processing com/google/android/gms/ads/internal/zzbx.class...
processing com/google/android/gms/ads/internal/zzc.class...
processing com/google/android/gms/ads/internal/zzd.class...
processing com/google/android/gms/ads/internal/zze.class...
processing com/google/android/gms/ads/internal/zzf.class...
processing com/google/android/gms/ads/internal/zzg.class...
processing com/google/android/gms/ads/internal/zzh.class...
processing com/google/android/gms/ads/internal/zzi.class...
processing com/google/android/gms/ads/internal/zzj.class...
processing com/google/android/gms/ads/internal/zzk.class...
processing com/google/android/gms/ads/internal/zzl.class...
processing com/google/android/gms/ads/internal/zzm.class...
processing com/google/android/gms/ads/internal/zzn.class...
processing com/google/android/gms/ads/internal/zzo.class...
processing com/google/android/gms/ads/internal/zzp.class...
processing com/google/android/gms/ads/internal/zzq.class...
processing com/google/android/gms/ads/internal/zzr.class...
processing com/google/android/gms/ads/internal/zzs.class...
processing com/google/android/gms/ads/internal/zzt.class...
processing com/google/android/gms/ads/internal/zzu.class...
processing com/google/android/gms/ads/internal/zzv.class...
processing com/google/android/gms/ads/internal/zzw.class...
processing com/google/android/gms/ads/internal/zzx.class...
processing com/google/android/gms/ads/internal/zzy.class...
processing com/google/android/gms/ads/internal/zzz.class...
ignored resource com/google/android/gms/dynamite/
ignored resource com/google/android/gms/dynamite/descriptors/
ignored resource com/google/android/gms/dynamite/descriptors/com/
ignored resource com/google/android/gms/dynamite/descriptors/com/google/
ignored resource com/google/android/gms/dynamite/descriptors/com/google/android/
ignored resource com/google/android/gms/dynamite/descriptors/com/google/android/gms/
ignored resource com/google/android/gms/dynamite/descriptors/com/google/android/gms/ads/
ignored resource com/google/android/gms/dynamite/descriptors/com/google/android/gms/ads/dynamite/
processing com/google/android/gms/dynamite/descriptors/com/google/android/gms/ads/dynamite/ModuleDescriptor.class...
ignored resource com/google/android/gms/internal/
processing com/google/android/gms/internal/zzaaa.class...
processing com/google/android/gms/internal/zzaab.class...
processing com/google/android/gms/internal/zzaac.class...
processing com/google/android/gms/internal/zzaad.class...
processing com/google/android/gms/internal/zzaae.class...
processing com/google/android/gms/internal/zzaaf.class...
processing com/google/android/gms/internal/zzaag.class...
processing com/google/android/gms/internal/zzaah.class...
processing com/google/android/gms/internal/zzaai.class...
processing com/google/android/gms/internal/zzaaj.class...
processing com/google/android/gms/internal/zzaak.class...
processing com/google/android/gms/internal/zzaal.class...
processing com/google/android/gms/internal/zzaam.class...
processing com/google/android/gms/internal/zzaan.class...
processing com/google/android/gms/internal/zzaao.class...
processing com/google/android/gms/internal/zzaap.class...
processing com/google/android/gms/internal/zzaaq.class...
processing com/google/android/gms/internal/zzaar.class...
processing com/google/android/gms/internal/zzaas.class...
processing com/google/android/gms/internal/zzaat.class...
processing com/google/android/gms/internal/zzaau.class...
processing com/google/android/gms/internal/zzaav.class...
processing com/google/android/gms/internal/zzaaw.class...
processing com/google/android/gms/internal/zzaax.class...
processing com/google/android/gms/internal/zzaay.class...
processing com/google/android/gms/internal/zzaaz.class...
processing com/google/android/gms/internal/zzaba.class...
processing com/google/android/gms/internal/zzabb.class...
processing com/google/android/gms/internal/zzabc.class...
processing com/google/android/gms/internal/zzabd.class...
processing com/google/android/gms/internal/zzabe.class...
processing com/google/android/gms/internal/zzabf.class...
processing com/google/android/gms/internal/zzabg.class...
processing com/google/android/gms/internal/zzabh.class...
processing com/google/android/gms/internal/zzabi.class...
processing com/google/android/gms/internal/zzabj.class...
processing com/google/android/gms/internal/zzabk.class...
processing com/google/android/gms/internal/zzabl.class...
processing com/google/android/gms/internal/zzabm.class...
processing com/google/android/gms/internal/zzabn.class...
processing com/google/an<message truncated>

Assets / Plugins / Android中的aar / jar文件列表:

play-services-ads-11.2.2
play-services-ads-lite-11.2.2
play-services-auth-10.2.6
play-services-auth-base-10.2.6
play-services-base-10.2.6
play-services-basement-11.2.2
play-services-drive-10.2.6
play-services-games-10.2.6
play-services-gass-11.2.2
play-services-nearby-10.2.6
play-services-tasks-10.2.6
support-annotations-25.2.0
support-compat-25.2.0
support-core-ui-25.2.0
support-core-utils-25.2.0
support-fragment-25.2.0
support-media-compat-25.2.0
support-v4-25.2.0

2 个答案:

答案 0 :(得分:2)

好的,我解决了。

我发现你需要每个aar文件的相同版本,但我把版本混淆了。 (例如我有play-services-ads-11.2.0和play-services-basement-10.2.0。)

然后我发现Play服务解析器根据给定插件的...Dependencies.xml文件下载这些文件。就我而言,这些是 GoogleMobileAdsDependencies.xmlGPGSDependencies.xml。我打开了它们,并在androidPackage标签中查找了版本号。在第一个文件中它是11.2.0,在第二个文件中它是10+。我将所有出现的版本更改为最新版本,即11.4.0。 (我从这里得到了信息:https://developers.google.com/android/guides/setup。)

我保存了文件,然后构建成功了。请注意,每次重新添加任何插件时都必须执行此修改。 (如果您重置或只是升级它们。)

答案 1 :(得分:-1)

  1. 检查所有$('#pmForm').submit(function(){$('input[type=submit]', this).attr('disabled','disabled');}); function sendPM(){ var pmTextArea = $("pmTextArea"); var sendName = $("pm_send_name"); var sendID = $("pm_send_id"); var receiveName = $("pm_receive_name"); var receiveID = $("pm_receive_id"); var url = "messages.php"; if (pmTextArea.val() == ""){ $("#interaction").html('Comment field is empty.').show().fadeOut(5000); } else { $.post(url,{ message: pmTextArea.val(), sendername: sendName.val(), senderid: sendID.val(), recname: receiveName.val(), recID: receiveID.val() }, function(data){ $("#interaction").html(data).show().fadeOut(5000); document.pmForm.pmTextArea value=''; }); } } 个文件,如果有相同的文件。
  2. 一种简单的方法:删除GooglePlaySever插件并重置它,请注意<?php session_start(); require_once 'class.channel.php'; require_once 'dbconfig.php'; $user_message = new USER(); if (isset($_POST['message'])) { $to = ($_POST['recID']); $from = ($_POST['senderid']); $toName = ($_POST['sendername']); $fromName = ($_POST['recname']); $msg = htmlspecialchars($_POST['message']); $stmt = $user_message->runQuery("INSERT INTO inbox(send_id, receive_id, timesent, comment) VALUES(?, ?, ?, ?)"); $stmt->bindValue(1,$from); $stmt->bindValue(2,$to); $stmt->bindValue(3,now()); $stmt->bindValue(4,$msg); $stmt->execute(); } ?> 不覆盖
  3. 希望它可以帮到你。