Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Could not find com.android.tools.build:gradle:3.2.1

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.

like image 378
mohammad Avatar asked Oct 17 '25 13:10

mohammad


1 Answers

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.

like image 151
Soli Avatar answered Oct 20 '25 04:10

Soli



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!