- Home /
CommandInvokationFailure: Gradle build failed 2020
Hi, today I have error in Console. How to solved it? Help me please. More details are there:
CommandInvokationFailure: Gradle build failed. D:/JDK\bin\java.exe -classpath "D:\Новая папка\2017.4.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx1024m" "bundleRelease"
stderr[ Note: there were 11 duplicate class definitions. (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':transformClassesAndResourcesWithProguardForRelease'.
Job failed, see logs for details
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 13s ] stdout[ :checkReleaseClasspath UP-TO-DATE :preBuild UP-TO-DATE :extractProguardFiles UP-TO-DATE :preReleaseBuild UP-TO-DATE :compileReleaseRenderscript UP-TO-DATE :generateReleaseResValues UP-TO-DATE :generateReleaseResources UP-TO-DATE :mergeReleaseResources UP-TO-DATE :checkReleaseManifest UP-TO-DATE :createReleaseCompatibleScreenManifests UP-TO-DATE :mainApkListPersistenceRelease UP-TO-DATE :processReleaseManifest :bundleReleaseResources :mergeReleaseShaders UP-TO-DATE :compileReleaseShaders UP-TO-DATE :generateReleaseAssets UP-TO-DATE :mergeReleaseAssets :compileReleaseAidl NO-SOURCE :generateReleaseBuildConfig UP-TO-DATE :prepareLintJar UP-TO-DATE :splitsDiscoveryTaskRelease UP-TO-DATE :processReleaseResources :generateReleaseSources :javaPreCompileRelease UP-TO-DATE :compileReleaseJavaWithJavac UP-TO-DATE :checkReleaseLibraries UP-TO-DATE :processReleaseJavaRes NO-SOURCE :transformResourcesWithMergeJavaResForRelease UP-TO-DATE :transformClassesAndResourcesWithProguardForRelease ProGuard, version 6.0.3 Reading input... Reading program jar [D:\STOP\Projects\Zendy the great\Temp\gradleOut\libs\unity-classes.jar] (filtered) Reading program jar [C:\Users\user.gradle\caches\transforms-1\files-1.1\unity-ads.aar\77cc9fa2894069ae9780076f50d04d85\jars\classes.jar] (filtered) Reading program jar [C:\Users\user.gradle\caches\transforms-1\files-1.1\UnityAds.aar\bb7e774320a4387d09071210a4a45a5b\jars\classes.jar] (filtered) Note: duplicate definition of program class [com.unity3d.ads.BuildConfig] Note: duplicate definition of program class [com.unity3d.ads.IUnityAdsListener] Note: duplicate definition of program class [com.unity3d.ads.UnityAds$FinishState] Note: duplicate definition of program class [com.unity3d.ads.UnityAds$PlacementState] Note: duplicate definition of program class [com.unity3d.ads.UnityAds$UnityAdsError] Note: duplicate definition of program class [com.unity3d.ads.UnityAds] Note: duplicate definition of program class [com.unity3d.ads.mediation.IUnityAdsExtendedListener] Note: duplicate definition of program class [com.unity3d.ads.metadata.InAppPurchaseMetaData] Note: duplicate definition of program class [com.unity3d.ads.metadata.MediationMetaData] Note: duplicate definition of program class [com.unity3d.ads.metadata.MetaData] Note: duplicate definition of program class [com.unity3d.ads.metadata.PlayerMetaData] Reading program jar [C:\Users\user.gradle\caches\transforms-1\files-1.1\UnityAdsAndroidPlugin.aar\0d452f9bb9d15952ceb1eeb4408f17b3\jars\classes.jar] (filtered) Reading program directory [D:\STOP\Projects\Zendy the great\Temp\gradleOut\build\intermediates\javac\release\compileReleaseJavaWithJavac\classes] (filtered) Reading program jar [D:\STOP\Projects\Zendy the great\Temp\gradleOut\build\intermediates\transforms\mergeJavaRes\release\0.jar] (filtered) Reading library jar [D:\SDK\SDK\platforms\android-29\android.jar] Reading library jar [D:\SDK\SDK\build-tools\29.0.2\core-lambda-stubs.jar] Reading library jar [D:\SDK\SDK\platforms\android-29\optional\org.apache.http.legacy.jar] Reading library jar [D:\SDK\SDK\platforms\android-29\optional\android.test.mock.jar] Reading library jar [D:\SDK\SDK\platforms\android-29\optional\android.test.base.jar] Reading library jar [D:\SDK\SDK\platforms\android-29\optional\android.test.runner.jar] Initializing... Note: com.unity3d.services.ar.ARCheck: can't find dynamically referenced class com.google.ar.core.Session Note: com.unity3d.services.store.StoreBilling: can't find dynamically referenced class com.android.vending.billing.IInAppBillingService$Stub Note: com.unity3d.services.store.StoreBilling: can't find dynamically referenced class com.android.vending.billing.IInAppBillingService Note: com.unity3d.services.store.StoreBilling: can't find dynamically referenced class com.android.vending.billing.IInAppBillingService Note: com.unity3d.services.store.StoreBilling: can't find dynamically referenced class com.android.vending.billing.IInAppBillingService Note: com.unity3d.services.store.StoreBilling: can't find dynamically referenced class com.android.vending.billing.IInAppBillingService Note: com.unity3d.services.ads.adunit.AdUnitActivity accesses a field 'layoutInDisplayCutoutMode' dynamically Maybe this is library field 'android.view.WindowManager$LayoutParams { int layoutInDisplayCutoutMode; }' Note: the configuration explicitly specifies 'android.webkit.JavascriptInterface' to keep library class 'android.webkit.JavascriptInterface' Note: the configuration explicitly specifies 'android.webkit.JavascriptInterface' to keep library class 'android.webkit.JavascriptInterface' Note: there were 2 library classes explicitly being kept. You don't need to keep library classes; they are already left unchanged. (http://proguard.sourceforge.net/manual/troubleshooting.html#libraryclass) Note: there were 6 unresolved dynamic references to classes or interfaces. You should check if you need to specify additional program jars. (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass) Note: there were 1 accesses to class members by means of introspection. You should consider explicitly keeping the mentioned class members (using '-keep' or '-keepclassmembers'). (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember) Note: you're ignoring all warnings! Ignoring unused library classes... Original number of library classes: 5000 Final number of library classes: 845 Printing kept classes, fields, and methods... Inlining subroutines... Shrinking... Printing usage to [D:\STOP\Projects\Zendy the great\Temp\gradleOut\build\outputs\mapping\release\usage.txt]... Removing unused program classes and class elements... Original number of program classes: 654 Final number of program classes: 645 Obfuscating... Printing mapping to [D:\STOP\Projects\Zendy the great\Temp\gradleOut\build\outputs\mapping\release\mapping.txt]... Preverifying... Writing output... Preparing output jar [D:\STOP\Projects\Zendy the great\Temp\gradleOut\build\intermediates\transforms\proguard\release\0.jar] Copying resources from program jar [D:\STOP\Projects\Zendy the great\Temp\gradleOut\libs\unity-classes.jar] (filtered) Copying resources from program jar [C:\Users\user.gradle\caches\transforms-1\files-1.1\unity-ads.aar\77cc9fa2894069ae9780076f50d04d85\jars\classes.jar] (filtered) Copying resources from program jar [C:\Users\user.gradle\caches\transforms-1\files-1.1\UnityAds.aar\bb7e774320a4387d09071210a4a45a5b\jars\classes.jar] (filtered) Warning: Exception while processing task java.io.IOException: Can't write [D:\STOP\Projects\Zendy the great\Temp\gradleOut\build\intermediates\transforms\proguard\release\0.jar] (Can't read [C:\Users\user.gradle\caches\transforms-1\files-1.1\UnityAds.aar\bb7e774320a4387d09071210a4a45a5b\jars\classes.jar(;;;;;;;**.class)] (Duplicate jar entry [com/unity3d/ads/BuildConfig.class])) Thread(Tasks limiter_2): destruction :transformClassesAndResourcesWithProguardForRelease FAILED 23 actionable tasks: 5 executed, 18 up-to-date ] exit code: 1 UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1 progress, System.String error) UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action1 progress) Rethrow as GradleInvokationException: Gradle build failed UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress) UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)