Gradle install not valid

Hi everyone,

I can’t build a gradle android app with unity 2018.2.0f2.
Internal work’s but I need gradle for oculus GO.

I already reinstall android sdk and jdk.

The displays message is :

Exception: Gradle install not valid

UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, 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)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:287)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Someone can help me?

I had this issue with 2019.2.0f1 - solved it by doing a clean install of Unity and had Unity load it’s own Android SDK on install.

Even though I did this, I still needed to go into preferences and tell Unity to use the gradle installed with Unity as it still defaulted to some old gradle directory that I had deleted previously.

I before the clean install I went in and made sure any previous SDK was unistalled. Then I wiped everything in the android directory on my computer - not sure if these wiping steps are needed or not. I did not need to reinstall java - I am running java version 8,

if you go to editor>Preferences External Tools tab there is a check box for Gradle Install with Unity. Make sure this check box is checked

@Auguin I have the same problem, any solution?,@Auguin Yo tengo el mismo problema, ¿Has encontrado alguna solucion?

I resolve the problem with uninstall all my unity versions, and also adb and java et reinstall all with the last unity version and now it’s working.

I hope this could help you!

I have also a same problem with gradle