gradle build failed unity 2019.4.15f1

hi i have hard time with Gradle my friends.
i just update unity to 2019.4.15f1LTS version and i also installed android build support from unity hub and everything downloaded ,but i cant even build an empty project.
gradle build failed …
this is what im dealing with these days .
i searched a lot and nothing worked for me .
i also download gradle 5.1.1 separately and changed the gradle path in preferences , didn’t work.

this is the error:
.
.
.
.
.
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Unity/Hub/Editor/2019.2.17f1/Editor/2019.4.15f1/Editor/Data/PlaybackEngines/AndroidPlayer\OpenJDK\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\2019.2.17f1\Editor\2019.4.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “assembleRelease”

stderr[

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:launcher’.

Could not resolve all artifacts for configuration ‘:launcher:classpath’.
Could not find gradle.jar (com.android.tools.build:gradle:3.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.jar
Could not find builder.jar (com.android.tools.build:builder:3.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.4.0/builder-3.4.0.jar
Could not find tracker.jar (com.android.tools.analytics-library:tracker:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.4.0/tracker-26.4.0.jar
Could not find shared.jar (com.android.tools.analytics-library:shared:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.4.0/shared-26.4.0.jar
Could not find crash.jar (com.android.tools.analytics-library:crash:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/crash/26.4.0/crash-26.4.0.jar
Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.4.0/lint-gradle-api-26.4.0.jar
Could not find gradle-api.jar (com.android.tools.build:gradle-api:3.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.4.0/gradle-api-3.4.0.jar
Could not find databinding-compiler-common.jar (androidx.databinding:databinding-compiler-common:3.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-compiler-common/3.4.0/databinding-compiler-common-3.4.0.jar
Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.4.0/manifest-merger-26.4.0.jar
Could not find sdk-common.jar (com.android.tools:sdk-common:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.4.0/sdk-common-26.4.0.jar
Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:3.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.4.0/builder-test-api-3.4.0.jar
Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.4.0/ddmlib-26.4.0.jar
Could not find sdklib.jar (com.android.tools:sdklib:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.4.0/sdklib-26.4.0.jar
Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.4.0/layoutlib-api-26.4.0.jar
Could not find dvlib.jar (com.android.tools:dvlib:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.4.0/dvlib-26.4.0.jar
Could not find repository.jar (com.android.tools:repository:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.4.0/repository-26.4.0.jar
Could not find common.jar (com.android.tools:common:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.4.0/common-26.4.0.jar
Could not find transform-api.jar (com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
Could not find jetifier-processor.jar (com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta04).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-processor/1.0.0-beta04/jetifier-processor-1.0.0-beta04.jar
Could not find bundletool.jar (com.android.tools.build:bundletool:0.7.2).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.7.2/bundletool-0.7.2.jar
Could not find jetifier-core.jar (com.android.tools.build.jetifier:jetifier-core:1.0.0-beta04).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-core/1.0.0-beta04/jetifier-core-1.0.0-beta04.jar
Could not find protos.jar (com.android.tools.analytics-library:protos:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.4.0/protos-26.4.0.jar
Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar
Could not find builder-model.jar (com.android.tools.build:builder-model:3.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.4.0/builder-model-3.4.0.jar
Could not find apkzlib.jar (com.android.tools.build:apkzlib:3.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/3.4.0/apkzlib-3.4.0.jar
Could not find apksig.jar (com.android.tools.build:apksig:3.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.4.0/apksig-3.4.0.jar
Could not find annotations.jar (com.android.tools:annotations:26.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.4.0/annotations-26.4.0.jar
Could not find databinding-common.jar (androidx.databinding:databinding-common:3.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/3.4.0/databinding-common-3.4.0.jar
Could not find baseLibrary.jar (com.android.databinding:baseLibrary:3.4.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.4.0/baseLibrary-3.4.0.jar

  • 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 8s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at :0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1[T] progress) (at :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 :0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :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 :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :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 :0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :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 :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

problem fixed here : Unity 2020 Android Support: Setup, SDK & NDK & JDK & Gradle - YouTube