2017-09-21 9 views
1

単純なUnity3Dプロジェクトからapkをビルドしようとしたときにエラーが発生しました。問題を再現するステップを実行しますか(Unity 3D 5.6.1p4を使用)
1. Firebase Analytics 4.1.0をダウンロードしてインポートします。 jsonを追加するなど、何かをセットアップしてください...アンドロイドリゾルバに問題があるため、「jarの解決」を実行できません。 Gradle failed to fetch dependencies。更新が必要です。
2.アンドロイドリゾルバを最新バージョンで置き換えます - Android Resolver 1.2.50。 apkとアナリティックワークスを構築できます。
3. Admob Plugin 3.7.0をダウンロードしてインポートしました。今はエラーのためにビルドできません。 "解決する"と "力を解決する"は役に立たない。
ログにエラーがあります。Firebase Analytic 4.1.0とAdmob 3.7.0でApkをビルドできません

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/Leo/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/zzehl; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzehm; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzehk; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/api/zzf; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzbbw; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzbbx; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzbby; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzbbz; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzbca; 

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:\Sources\Unity5\Kong Run 2D\Temp\StagingArea\android-libraries\GoogleMobileAdsPlugin\libs\.\unity-plugin-library.jar... 
processing com/google/unity/BuildConfig.class... 
processing com/google/unity/ads/AdNetworkExtras.class... 
processing com/google/unity/ads/Banner.class... 
processing com/google/unity/ads/Banner$1.class... 
processing com/google/unity/ads/Banner$2.class... 
processing com/google/unity/ads/Banner$3.class... 
processing com/google/unity/ads/Banner$4.class... 
processing com/google/unity/ads/Banner$5.class... 
processing com/google/unity/ads/Banner$6.class... 
processing com/google/unity/ads/Banner$7.class... 
processing com/google/unity/ads/CustomNativeAd.class... 
processing com/google/unity/ads/CustomNativeAd$1.class... 
processing com/google/unity/ads/CustomNativeAd$2.class... 
processing com/google/unity/ads/Interstitial.class... 
processing com/google/unity/ads/Interstitial$1.class... 
processing com/google/unity/ads/Interstitial$1$1.class... 
processing com/google/unity/ads/Interstitial$2.class... 
processing com/google/unity/ads/Interstitial$3.class... 
processing com/google/unity/ads/NativeAdLoader.class... 
processing com/google/unity/ads/NativeAdLoader$1.class... 
processing com/google/unity/ads/NativeAdLoader$2.class... 
processing com/google/unity/ads/NativeAdLoader$3.class... 
processing com/google/unity/ads/NativeAdLoader$3$1.class... 
processing com/google/unity/ads/NativeAdLoader$3$2.class... 
processing com/google/unity/ads/NativeAdLoader$3$3.class... 
processing com/google/unity/ads/NativeAdLoader$4.class... 
processing com/google/unity/ads/NativeExpressAd.class... 
processing com/google/unity/ads/NativeExpressAd$1.class... 
processing com/google/unity/ads/NativeExpressAd$2.class... 
processing com/google/unity/ads/NativeExpressAd$3.class... 
processing com/google/unity/ads/NativeExpressAd$4.class... 
processing com/google/unity/ads/NativeExpressAd$5.class... 
processing com/google/unity/ads/NativeExpressAd$6.class... 
processing com/google/unity/ads/NativeExpressAd$7.class... 
processing com/google/unity/ads/NativeExpressAd$8.class... 
processing com/google/unity/ads/PluginUtils.class... 
processing com/google/unity/ads/RewardBasedVideo.class... 
processing com/google/unity/ads/RewardBasedVideo$1.class... 
processing com/google/unity/ads/RewardBasedVideo$1$1.class... 
processing com/google/unity/ads/RewardBasedVideo$2.class... 
processing com/google/unity/ads/RewardBasedVideo$3.class... 
processing com/google/unity/ads/UnityAdListener.class... 
processing com/google/unity/ads/UnityAdLoaderListener.class... 
processing com/google/unity/ads/UnityRewardBasedVideoAdListener.class... 
processing archive C:\Sources\Unity5\Kong Run 2D\Temp\StagingArea\android-libraries\firebase-analytics-11.2.0\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/measurement/ 
processing com/google/android/gms/measurement/AppMeasurementContentProvider.class... 
processing com/google/android/gms/measurement/AppMeasurementInstallReferrerReceiver.class... 
processing com/google/android/gms/measurement/AppMeasurementJobService.class... 
processing com/google/android/gms/measurement/AppMeasurementReceiver.class... 
processing com/google/android/gms/measurement/AppMeasurementService.class... 
processing archive C:\Sources\Unity5\Kong Run 2D\Temp\StagingArea\android-libraries\firebase-analytics-impl-11.2.0\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/internal/ 
processing com/google/android/gms/internal/zzcaf.class... 
processing com/google/android/gms/internal/zzcag.class... 
processing com/google/android/gms/internal/zzcah.class... 
processing com/google/android/gms/internal/zzcai.class... 
processing com/google/android/gms/internal/zzcaj.class... 
processing com/google/android/gms/internal/zzcak.class... 
processing com/google/android/gms/internal/zzcal.class... 
processing com/google/android/gms/internal/zzcam.class... 
processing com/google/android/gms/internal/zzcan.class... 
processing com/google/android/gms/internal/zzcao.class... 
processing com/google/android/gms/internal/zzcap.class... 
processing com/google/android/gms/internal/zzcaq.class... 
processing com/google/android/gms/internal/zzcar.class... 
processing com/google/android/gms/internal/zzcas.class... 
processing com/google/android/gms/internal/zzcat.class... 
processing com/google/android/gms/internal/zzcau.class... 
processing com/google/android/gms/internal/zzcav.class... 
processing com/google/android/gms/internal/zzcaw.class... 
processing com/google/android/gms/internal/zzcax.class... 
processing com/google/android/gms/internal/zzcay.class... 
processing com/google/android/gms/internal/zzcaz.class... 
processing com/google/android/gms/internal/zzcba.class... 
processing com/google/android/gms/internal/zzcbb.class... 
processing com/google/android/gms/internal/zzcbc.class... 
processing com/google/android/gms/internal/zzcbd.class... 
processing com/google/android/gms/internal/zzcbe.class... 
processing com/google/android/gms/internal/zzcbf.class... 
processing com/google/android/gms/internal/zzcbg.class... 
processing com/google/android/gms/internal/zzcbh.class... 
processing com/google/android/gms/internal/zzcbi.class... 
processing com/google/android/gms/internal/zzcbj.class... 
processing com/google/android/gms/internal/zzcbk.class... 
processing com/google/android/gms/internal/zzcbl.class... 
processing com/google/android/gms/internal/zzcbm.class... 
processing com/google/android/gms/internal/zzcbn.class... 
processing com/google/android/gms/internal/zzcbo.class... 
processing com/google/android/gms/internal/zzcbp.class... 
processing com/google/android/gms/internal/zzcbq.class... 
processing com/google/android/gms/internal/zzcbr.class... 
processing com/google/android/gms/internal/zzcbs.class... 
processing com/google/android/gms/internal/zzcbt.class... 
processing com/google/android/gms/internal/zzcbu.class... 
processing com/google/android/gms/internal/zzcbv.class... 
processing com/google/android/gms/internal/zzcbw.class... 
processing com/google/android/gms/internal/zzcbx.class... 
processing com/google/android/gms/internal/zzcby.class... 
processing com/google/android/gms/internal/zzcbz.class... 
processing com/google/android/gms/internal/zzcca.class... 
processing com/google/android/gms/internal/zzccb.class... 
processing com/google/android/gms/internal/zzccc.class... 
processing com/google/android/gms/internal/zzccd.class... 
processing com/google/android/gms/internal/zzcce.class... 
processing com/google/android/gms/internal/zzccf.class... 
processing com/google/android/gms/internal/zzccg.class... 
processing com/google/android/gms/internal/zzcch.class... 
processing com/google/android/gms/internal/zzcci.class... 
processing com/google/android/gms/internal/zzccj.class... 
processing com/google/android/gms/internal/zzcck.class... 
processing com/google/android/gms/internal/zzccl.class... 
processing com/google/android/gms/internal/zzccm.class... 
processing com/google/android/gms/internal/zzccn.class... 
processing com/google/android/gms/internal/zzcco.class... 
processing com/google/android/gms/internal/zzcco$zza.class... 
processing com/google/android/gms/internal/zzccp.class... 
processing com/google/android/gms/internal/zzccq.class... 
processing com/google/android/gms/internal/zzccr.class... 
processing com/google/android/gms/internal/zzccs.class... 
processing com/google/android/gms/internal/zzcct.class... 
processing com/google/android/gms/internal/zzccu.class... 
processing com/google/android/gms/internal/zzccv.class... 
processing com/google/android/gms/internal/zzccw.class... 
processing com/google/android/gms/internal/zzccx.class... 
processing com/google/android/gms/internal/zzccy.class... 
processing com/google/android/gms/internal/zzccz.class... 
processing com/google/android/gms/internal/zzcda.class... 
processing com/google/android/gms/internal/zzcdb.class... 
processing com/google/android/gms/internal/zzcdc.class... 
processing com/google/android/gms/internal/zzcdd.class... 
processing com/google/android/gms/internal/zzcde.class... 
processing com/google/android/gms/internal/zzcdf.class... 
processing com/google/android/gms/internal/zzcdg.class... 
processing com/google/android/gms/internal/zzcdh.class... 
processing com/google/android/gms/internal/zzcdi.class... 
processing com/google/android/gms/internal/zzcdj.class... 
processing com/google/android/gms/internal/zzcdk.class... 
processing com/google/android/gms/internal/zzcdl.class... 
processing com/google/android/gms/internal/zzcdm.class... 
processing com/google/android/gms/internal/zzcdn.class... 
processing com/google/android/gms/internal/zzcdo.class... 
processing com/google/android/gms/internal/zzcdp.class... 
processing com/google/android/gms/internal/zzcdq.class... 
processing com/google/android/gms/internal/zzcdr.class... 
processing com/google/android/gms/internal/zzcds.class... 
processing com/google/android/gms/internal/zzcdt.class... 
processing com/google/android/gms/internal/zzcdu.class... 
processing com/google/android/gms/internal/zzcdv.class... 
processing com/google/android/gms/internal/zzcdw.class... 
processing com/google/android/gms/internal/zzcdx.class... 
processing com/google/android/gms/internal/zzcdy.class... 
processing com/google/android/gms/internal/zzcdz.class... 
processing com/google/android/gms/internal/zzcea.class... 
processing com/google/android/gms/internal/zzceb.class... 
processing com/google/android/gms/internal/zzcec.class... 
processing com/google/android/gms/internal/zzced.class... 
processing com/google/android/gms/internal/zzcee.class... 
processing com/google/android/gms/internal/zzcef.class... 
processing com/google/android/gms/internal/zzceg.class... 
processing com/google/android/gms/internal/zzceh.class... 
processing com/google/android/gms/internal/zzcei.class... 
processing com/google/android/gms/internal/zzcej.class... 
processing com/google/android/gms/internal/zzcek.class... 
processing com/google/android/gms/internal/zzcel.class... 
processing com/google/android/gms/internal/zzcem.class... 
processing com/google/android/gms/internal/zzcen.class... 
processing com/google/android/gms/internal/zzceo.class... 
processing com/google/android/gms/internal/zzcep.class... 
processing com/google/android/gms/internal/zzceq.class... 
processing com/google/android/gms/internal/zzcer.class... 
processing com/google/android/gms/internal/zzces.class... 
processing com/google/android/gms/internal/zzcet.class... 
processing com/google/android/gms/internal/zzceu.class... 
processing com/google/android/gms/internal/zzcev.class... 
processing com/google/android/gms/internal/zzcew.class... 
processing com/google/android/gms/internal/zzcex.class... 
processing com/google/android/gms/internal/zzcey.class... 
processing com/google/android/gms/internal/zzcez.class... 
processing com/google/android/gms/internal/zzcfa.class... 
processing com/google/android/gms/internal/zzcfb.class... 
processing com/google/android/gms/internal/zzcfc.class... 
processing com/google/android/gms/internal/zzcfd.class... 
processing com/google/android/gms/internal/zzcfe.class... 
processing com/google/android/gms/internal/zzcff.class... 
processing com/google/android/gms/internal/zzcfg.class... 
processing com/google/android/gms/internal/zzcfh.class... 
processing com/google/android/gms/internal/zzcfi.class... 
processing com/google/android/gms/internal/zzcfj.class... 
processing com/google/android/gms/internal/zzcfk.class... 
processing com/google/android/gms/internal/zzcfl.class... 
processing com/google/android/gms/internal/zzcfm.class... 
processing com/google/android/gms/internal/zzcfn.class... 
processing com/google/android/gms/internal/zzcfo.class... 
processing com/google/android/gms/internal/zzcfp.class... 
processing com/google/android/gms/internal/zzcfq.class... 
processing com/google/android/gms/internal/zzcfr.class... 
processing com/google/android/gms/internal/zzcfs.class... 
processing com/google/android/gms/internal/zzcft.class... 
processing com/google/android/gms/internal/zzcfu.class... 
processing com/google/android/gms/internal/zzcfv.class... 
processing com/google/android/gms/internal/zzcfw.class... 
processing com/google/android/gms/internal/zzcfx.class... 
processing com/google/android/gms/internal/zzcfy.class... 
processing com/google/android/gms/internal/zzcfz.class... 
processing com/google/android/gms/internal/zzcga.class... 
processing com/google/android/gms/internal/zzcgb.class... 
processing com/google/android/gms/internal/zzcgc.class... 
processing com/google/android/gms/internal/zzcgd.class... 
processing com/google/android/gms/internal/zzcge.class... 
ignored resource com/google/android/gms/measurement/ 
processing com/google/android/gms/measurement/AppMeasurement.class... 
processing com/google/android/gms/measurement/AppMeasurement$ConditionalUserProperty.class... 
processing com/google/android/gms/measurement/AppMeasurement$Event.class... 
processing com/google/android/gms/measurement/AppMeasurement$EventInterceptor.class... 
processing com/google/android/gms/measurement/AppMeasurement$OnEventListener.class... 
processing com/google/android/gms/measurement/AppMeasurement$Param.class... 
processing com/google/android/gms/measurement/AppMeasurement$UserProperty.class... 
processing com/google/android/gms/measurement/AppMeasurement$zza.class... 
processing com/google/android/gms/measurement/AppMeasurement$zzb.class... 
ignored resource com/google/firebase/ 
ignored resource com/google/firebase/analytics/ 
processing com/google/firebase/analytics/FirebaseAnalytics.class... 
processing com/google/firebase/analytics/FirebaseAnalytics$Event.class... 
processing com/google/firebase/analytics/FirebaseAnalytics$Param.class... 
processing com/google/firebase/<message truncated> 

答えて

1

私は更新プログラムの依存関係ファイルによって修正されました。パスからGoogleMobileAdsDependencies.xmlを開きます。

Assets\GoogleMobileAds\Editor\GoogleMobileAdsDependencies.xml 

変更 "com.google.android.gms: - サービス - 広告を再生する:11.2.2" "com.google.android.gms:遊ぶ - サービス - 広告:11.2.0" へ。 "Tools \ Player Services Resovler \ Android Resolver \ Force Resolve"を実行します。ビルドは今すぐ動作します。
"11.2.0"が機能しない場合は、古いバージョンを変更してください。

+1

FYI:Firebase SDKの4.2.0バージョンhttps://firebase.google.com/support/release-notes/unity#4.2.0には、1.2.53バージョンのPlay Services Resolver(https: /github.com/googlesamples/unity-jar-resolver)、競合するPlayサービスのバージョンを自動的に修正します。 – stewartmiles

関連する問題