Recently, I change my Operating System to Fedora 26 for development.

Problem

However, when I build my android project, it sucks at:

Gradle: Resolve dependencies ':app:_debugCompile'

Solution

Open the file build.gradle in the project root directory.

Change all the repositories{...} to:

repositories {
        mavenCentral()
        maven { url 'http://repo1.maven.org/maven2' }
        jcenter()
}

Tips: in buildscript{...} and allprojects{...}

Then, check the file gradle.properties in your project root directory. Make sure there is no proxy for gradle, like this:

#systemProp.https.proxyPort=1080
#systemProp.http.proxyHost=127.0.0.1
org.gradle.jvmargs=-Xmx1536m
#systemProp.https.proxyHost=127.0.0.1
#systemProp.http.proxyPort=1080

Build the project, see what it happens.

Reason

Beacuse some you known reasons in China, the jcenter() repository is too slow to download any file through it.

So after we changing the repositories, the problem has been solved.

    分享到:
分类: AndroidLinux

发表评论

电子邮件地址不会被公开。 必填项已用*标注

验证码 *