ERROR: Could not find com.android.tools.build:gradle:3.2.1
4,778
Solution 1
I remember facing such problems, and surprisingly found out that I have network problem!
Here are steps may help you: - check your system proxy settings. - then, File -> invalid Cashes/Restart.
Solution 2
clear gradle cache
rm -rf $HOME/.gradle/caches
and resync to download all dependencies
Go Settings/Gradle/Android Studio. Then check "Enable embedded Maven repository". And you're good to go.
Solution 3
Try classpath 'com.android.tools.build:gradle:3.5.3'
also an unrelated addition, Kotlin is -> ext.kotlin_version = '1.3.61'
Author by
mohammad
Updated on December 16, 2022Comments
-
mohammad over 1 year
when I want to open or run a project , I get error below :
ERROR: Could not find com.android.tools.build:gradle:3.2.1. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.jar - https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom - https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.jar Required by: project : Open File
and this is my build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.3.50' repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
also by deffault , it contains google repo but the error is there . I am running on ubuntu 19.1 , and follow the instructions but unfortunetly I can not solve this. Thanks to Community.
-
mohammad over 4 yearsI try that, but the result is the same !!
-
Mojtaba Darzi almost 3 yearswhere is the file ?!