Search Unity

Unable to Unzip - Gradle-Launcher-4.0.1.jar

Discussion in 'Android' started by matthewseaward, Aug 19, 2018.

  1. matthewseaward

    matthewseaward

    Joined:
    Apr 12, 2013
    Posts:
    50
    Hi,

    I am making a game for Android and have both Google FireBase and Google play plugins installed.

    Opening the project gives me this error. The file in question does exist in the file location and is not set to read only.

    Error expanding C:\Users\Matth\Desktop\Project\Assets\Plugins\Android\com.google.games.gpgs-plugin-support-0.9.50.aar err: 1: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:219)
    at java.util.zip.ZipFile.<init>(ZipFile.java:149)
    at java.util.zip.ZipFile.<init>(ZipFile.java:120)
    at sun.tools.jar.Main.extract(Main.java:1004)
    at sun.tools.jar.Main.run(Main.java:305)
    at sun.tools.jar.Main.main(Main.java:1288)

    UnityEngine.Debug:LogError(Object)
    GooglePlayServices.DefaultResolver:ExtractAar(String, String[], String)
    GooglePlayServices.ResolverVer1_1:ShouldExplode(String)
    GooglePlayServices.ResolverVer1_1:LoadAarExplodeCache()
    GooglePlayServices.ResolverVer1_1:.ctor()
    GooglePlayServices.PlayServicesResolver:.cctor()
    Firebase.Editor.GenerateXmlFromGoogleServicesJson:.cctor()
    Firebase.Editor.GenerateXmlFromGoogleServicesJson:.cctor()
    UnityEditor.EditorAssemblies:processInitializeOnLoadAttributes()

    Trying to build the project gives me this error. I believe these errors are related to one another.

    CommandInvokationFailure: Gradle build failed.
    C:/Program Files/Java/jdk1.8.0_121\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"

    stderr[

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':prepareComGoogleGamesGpgsPluginSupport0950Library'.
    > Unable to unzip 'C:\Users\Matth\Desktop\Project\Temp\gradleOut\libs\com.google.games.gpgs-plugin-support-0.9.50.aar' to 'C:\Users\Matth\.android\build-cache\bbe385dd2f84d4ee5ec2986d91879163a8310210\output'

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED in 1s
    ]
    stdout[
    NDK is missing a "platforms" directory.
    If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Matth\AppData\Local\Android\Sdk\ndk-bundle.
    If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

    NDK is missing a "platforms" directory.
    If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Matth\AppData\Local\Android\Sdk\ndk-bundle.
    If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

    The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
    The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
    The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
    NDK is missing a "platforms" directory.
    If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Matth\AppData\Local\Android\Sdk\ndk-bundle.
    If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

    :preBuild UP-TO-DATE
    :preReleaseBuild UP-TO-DATE
    :checkReleaseManifest
    :preDebugBuild UP-TO-DATE
    :prepareComAndroidSupportSupportCompat2520Library
    :prepareComAndroidSupportSupportCoreUi2520Library
    :prepareComAndroidSupportSupportCoreUtils2520Library
    :prepareComAndroidSupportSupportFragment2520Library
    :prepareComAndroidSupportSupportMediaCompat2520Library
    :prepareComAndroidSupportSupportV42520Library
    :prepareComGoogleAndroidGmsPlayServicesAuth1180Library
    :prepareComGoogleAndroidGmsPlayServicesAuthApiPhone1180Library
    :prepareComGoogleAndroidGmsPlayServicesAuthApiPhoneLicense1180Library
    :prepareComGoogleAndroidGmsPlayServicesAuthBase1180Library
    :prepareComGoogleAndroidGmsPlayServicesAuthBaseLicense1180Library
    :prepareComGoogleAndroidGmsPlayServicesBase1180Library
    :prepareComGoogleAndroidGmsPlayServicesBaseLicense1180Library
    :prepareComGoogleAndroidGmsPlayServicesBasement1180Library
    :prepareComGoogleAndroidGmsPlayServicesBasementLicense1180Library
    :prepareComGoogleAndroidGmsPlayServicesDrive1180Library
    :prepareComGoogleAndroidGmsPlayServicesDriveLicense1180Library
    :prepareComGoogleAndroidGmsPlayServicesGames1180Library
    :prepareComGoogleAndroidGmsPlayServicesGamesLicense1180Library
    :prepareComGoogleAndroidGmsPlayServicesNearby1180Library
    :prepareComGoogleAndroidGmsPlayServicesNearbyLicense1180Library
    :prepareComGoogleAndroidGmsPlayServicesTasks1180Library
    :prepareComGoogleAndroidGmsPlayServicesTasksLicense1180Library
    :prepareComGoogleFirebaseFirebaseAnalytics1180Library
    :prepareComGoogleFirebaseFirebaseAnalyticsImpl1180Library
    :prepareComGoogleFirebaseFirebaseAnalyticsImplLicense1180Library
    :prepareComGoogleFirebaseFirebaseAnalyticsLicense1180Library
    :prepareComGoogleFirebaseFirebaseAnalyticsUnity443Library
    :prepareComGoogleFirebaseFirebaseAppUnity443Library
    :prepareComGoogleFirebaseFirebaseAuth1180Library
    :prepareComGoogleFirebaseFirebaseAuthLicense1180Library
    :prepareComGoogleFirebaseFirebaseAuthUnity443Library
    :prepareComGoogleFirebaseFirebaseCommon1180Library
    :prepareComGoogleFirebaseFirebaseCommonLicense1180Library
    :prepareComGoogleFirebaseFirebaseConfig1180Library
    :prepareComGoogleFirebaseFirebaseConfigLicense1180Library
    :prepareComGoogleFirebaseFirebaseConfigUnity443Library
    :prepareComGoogleFirebaseFirebaseCore1180Library
    :prepareComGoogleFirebaseFirebaseIid1180Library
    :prepareComGoogleFirebaseFirebaseIidLicense1180Library
    :prepareComGoogleFirebaseFirebaseMessaging1180Library
    :prepareComGoogleFirebaseFirebaseMessagingLicense1180Library
    :prepareComGoogleFirebaseFirebaseMessagingUnity443Library
    :prepareComGoogleGamesGpgsPluginSupport0950Library FAILED
    45 actionable tasks: 45 executed
    ]
    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.Action`1 progress, System.String error)
    UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 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)

    I've checked the location it specifies in the file path (C:\Program Files\Java\jdk1.8.0_121\bin) and there isn't the GradleLauncher.jar set. I haven't removed said file and this error has only recently started appearing.

    My Android SDKs are attached.
    Unitys paths to the JDK and SDKs are valid and I am doing a Gradle Build
     

    Attached Files:

    Last edited: Aug 19, 2018