Android Studio Gradle无法获取pom文件

两年多没写Android应用了,想重新捡起来。从解决Android Studio的各种问题开始吧。

Could not GET 'https://jcenter.bintray.com/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.pom'. Received status code 407 from server: authenticationrequired
        Consult IDE log for more details (Help | Show Log) (2s 883ms)

Android Studio Gradle无法获取pom文件。

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
    }
}

在Project的build.gradle里的allprojects里添加

maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }

并点击 Gradle—>设置—>Android Studio,勾选 Enable embedded Maven repository

你可能感兴趣的:(开发工具)