Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

Gradle build error with Unity2020.1.0a3

Discussion in '2020.1 Beta' started by ClemGrt, Sep 26, 2019.

  1. ClemGrt

    ClemGrt

    Joined:
    Nov 8, 2016
    Posts:
    18
    Good evening,
    I am deseperatly trying to convert one project to 64bits format. I had lots of troubles and the last one is a Gradle failure at building. I am publishing the report here. I hope someone will be able to help me :

    CommandInvokationFailure: Gradle build failed.
    D:/Unity/2020.1.0a3/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "D:\Unity\2020.1.0a3\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"

    stderr[

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
    > 1 exception was raised by workers:
    java.lang.RuntimeException: Duplicate class com.google.games.bridge.BuildConfig found in modules classes.jar :)com.google.games.gpgs-plugin-support-0.9.62:) and classes.jar (classes.jar)
    Duplicate class com.google.games.bridge.NativeBridgeActivity found in modules classes.jar :)com.google.games.gpgs-plugin-support-0.9.62:) and classes.jar (classes.jar)
    Duplicate class com.google.games.bridge.TokenFragment found in modules classes.jar :)com.google.games.gpgs-plugin-support-0.9.62:) and classes.jar (classes.jar)
    Duplicate class com.google.games.bridge.TokenFragment$1 found in modules classes.jar :)com.google.games.gpgs-plugin-support-0.9.62:) and classes.jar (classes.jar)
    Duplicate class com.google.games.bridge.TokenFragment$1$1 found in modules classes.jar :)com.google.games.gpgs-plugin-support-0.9.62:) and classes.jar (classes.jar)
    Duplicate class com.google.games.bridge.TokenFragment$2 found in modules classes.jar :)com.google.games.gpgs-plugin-support-0.9.62:) and classes.jar (classes.jar)
    Duplicate class com.google.games.bridge.TokenFragment$3 found in modules classes.jar :)com.google.games.gpgs-plugin-support-0.9.62:) and classes.jar (classes.jar)
    Duplicate class com.google.games.bridge.TokenFragment$TokenRequest found in modules classes.jar :)com.google.games.gpgs-plugin-support-0.9.62:) and classes.jar (classes.jar)
    Duplicate class com.google.games.bridge.TokenPendingResult found in modules classes.jar :)com.google.games.gpgs-plugin-support-0.9.62:) and classes.jar (classes.jar)
    Duplicate class com.google.games.bridge.TokenResult found in modules classes.jar :)com.google.games.gpgs-plugin-support-0.9.62:) and classes.jar (classes.jar)

    Go to the documentation to learn how to Fix dependency resolution errors.


    * 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 30s
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    ]
    stdout[
    Starting a Gradle Daemon, 1 incompatible and 4 stopped Daemons could not be reused, use --status for details
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:preBuild UP-TO-DATE
    > Task :launcher:preBuild UP-TO-DATE
    > Task :unityLibrary:preBuild UP-TO-DATE
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:preBuild UP-TO-DATE
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:preReleaseBuild UP-TO-DATE
    > Task :launcher:prepareLintJar
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:checkReleaseManifest
    > Task :unityLibrary:checkReleaseManifest
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:checkReleaseManifest
    > Task :unityLibrary:processReleaseManifest
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:processReleaseManifest
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:processReleaseManifest
    > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:generateReleaseResValues
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:generateReleaseResources
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:generateReleaseResValues
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:generateReleaseResources
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:generateReleaseResValues
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:generateReleaseResources
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:packageReleaseResources
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:mergeReleaseShaders
    > Task :unityLibrary:packageReleaseResources
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:compileReleaseShaders
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:generateReleaseAssets
    > Task :unityLibrary:mergeReleaseShaders
    > Task :unityLibrary:compileReleaseShaders
    > Task :unityLibrary:generateReleaseAssets
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:packageReleaseAssets
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:packageReleaseResources
    > Task :unityLibrary:packageReleaseAssets
    > Task :unityLibrary:generateReleaseBuildConfig
    > Task :unityLibrary:prepareLintJar
    > Task :unityLibrary:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:mergeReleaseShaders
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:compileReleaseShaders
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:generateReleaseAssets
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:packageReleaseAssets
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:compileReleaseAidl NO-SOURCE
    > Task :launcher:preReleaseBuild
    > Task :launcher:compileReleaseRenderscript NO-SOURCE
    > Task :launcher:generateReleaseResValues
    > Task :launcher:generateReleaseResources
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:generateReleaseRFile
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:generateReleaseRFile
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:generateReleaseBuildConfig
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:generateReleaseBuildConfig
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:prepareLintJar
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:generateReleaseSources
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:javaPreCompileRelease
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:prepareLintJar
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:generateReleaseSources
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:javaPreCompileRelease
    > Task :unityLibrary:mergeReleaseJniLibFolders
    > Task :unityLibrary:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:generateReleaseRFile
    > Task :unityLibrary:generateReleaseSources
    > Task :unityLibrary:transformNativeLibsWithMergeJniLibsForRelease
    > Task :unityLibrary:transformNativeLibsWithStripDebugSymbolForRelease
    > Task :unityLibrary:transformNativeLibsWithIntermediateJniLibsForRelease
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:compileReleaseJavaWithJavac
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:bundleLibCompileRelease
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:compileReleaseJavaWithJavac
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:bundleLibRuntimeRelease
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:bundleLibCompileRelease
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:bundleLibRuntimeRelease
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:bundleLibResRelease
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:mergeReleaseJniLibFolders
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:transformNativeLibsWithMergeJniLibsForRelease
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:transformNativeLibsWithStripDebugSymbolForRelease
    > Task :unityLibrary:GooglePlayGamesManifest.plugin:transformNativeLibsWithIntermediateJniLibsForRelease
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:bundleLibResRelease
    > Task :unityLibrary:javaPreCompileRelease
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:mergeReleaseJniLibFolders
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:transformNativeLibsWithMergeJniLibsForRelease
    > Task :launcher:mergeReleaseResources
    > Task :launcher:checkReleaseManifest
    > Task :launcher:createReleaseCompatibleScreenManifests
    > Task :launcher:mainApkListPersistenceRelease
    > Task :launcher:processReleaseManifest
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:transformNativeLibsWithStripDebugSymbolForRelease
    > Task :unityLibrary:com.google.games.gpgs-plugin-support-0.9.62:transformNativeLibsWithIntermediateJniLibsForRelease
    > Task :launcher:bundleReleaseResources
    > Task :launcher:mergeReleaseShaders
    > Task :launcher:compileReleaseShaders
    > Task :launcher:generateReleaseAssets
    > Task :unityLibrary:compileReleaseJavaWithJavac
    > Task :unityLibrary:bundleLibCompileRelease
    > Task :unityLibrary:bundleLibRuntimeRelease
    > Task :unityLibrary:bundleLibResRelease
    > Task :launcher:mergeReleaseAssets
    > Task :launcher:checkReleaseDuplicateClasses FAILED

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
    Use '--warning-mode all' to show the individual deprecation warnings.
    See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
    70 actionable tasks: 70 executed
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4870ca009482433dbc8444c5f62e8357>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4870ca009482433dbc8444c5f62e8357>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4870ca009482433dbc8444c5f62e8357>:0)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <4870ca009482433dbc8444c5f62e8357>:0)
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <4870ca009482433dbc8444c5f62e8357>:0)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <4870ca009482433dbc8444c5f62e8357>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4870ca009482433dbc8444c5f62e8357>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4870ca009482433dbc8444c5f62e8357>:0)
    Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <4870ca009482433dbc8444c5f62e8357>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4870ca009482433dbc8444c5f62e8357>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <4870ca009482433dbc8444c5f62e8357>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <4870ca009482433dbc8444c5f62e8357>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <5bab1a3ac70c4024afd9bc9427b3a6a7>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Thank you very much