maryam
maryam

Reputation: 21

I installed the latest version of Android Studio. I encountered error while syncing gradle

I installed the latest version of Android Studio. I encountered the following error while syncing gradle:Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom'. Received status code 403 from server: Forbidden Disable Gradle 'offline mode' and sync project. I disabled 'offline mode' and when i synced again while downloading 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom'. This error occurred: { "errors" : [ { "status" : 404, "message" : "Could not find resource" } ] } please help me to solve this problem.

Upvotes: 2

Views: 1500

Answers (1)

shsh
shsh

Reputation: 51

I have the same problem. I tried to Clean and Rebuild the project but it didn't work. Also tried the Invalidate cashes/restart from File menu too, it didn't work. I changed the repositories in build.gradle to this:

repositories {
        google()
        maven {
            url "https://maven.google.com"
        }
        maven {url"https://jitpack.io"}
        jcenter()
        //mavenCentral()
    }

Tried without and with these changes too but the problem still not solved. Any other help? And I used different network connections with and without VPNs , again, was not helpful.

Upvotes: 2

Related Questions