简体   繁体   English

我安装了最新版本的 Android Studio。 我在同步 gradle 时遇到错误

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

I installed the latest version of Android Studio.我安装了最新版本的 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'.我在同步 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.从服务器收到状态代码 403:禁止禁用 Gradle“离线模式”和同步项目。 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'.我禁用了“离线模式”,当我在下载“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.发生此错误:{ "errors": [ { "status": 404, "message": "Could not find resource" } ] } 请帮我解决这个问题。

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:我将build.gradle中的存储库更改为:

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.而且我使用了不同的网络连接,有和没有 VPN,同样没有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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