I am using unity 2019.4.4f1 and i have been having this trouble whenever i want to build my project and make a .apk out of it, here is the error i am getting in console:
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 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 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 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 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 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 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
* 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
Also here is a screen shot of my Preferences:
Also i have seen other posts related to my question but none of them really helped me.