简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM