AndroidStudio3.5.2 warehouse repository settings Daquan

AndroidStudio3.5.2 version of the warehouse settings, here I summarize, we can set it as a foreign warehouse, a local offline warehouse (not very reliable, there are many things to download, but not complete), or a domestic Aliyun warehouse, At present, I only saw Alibaba Cloud's maven repository, so I will update it later.
Android 3.6.2 is too new, so I gave up after trying many times and I was unhappy, because many repositories could not provide all the dependent packages, resulting in repeated compilation failures and errors, even if the compilation Through, the problem continues when running. So I suggest you try to use the not so new version, after all, stability is the most important thing.
We can set it in build.gradle or in AndroidStudio, as follows:

repositories {
    
    
//        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
//        maven { url 'https://maven.aliyun.com/repository/google' }
//        maven { url 'https://maven.aliyun.com/repository/jcenter'}
//        maven { url 'https://maven.aliyun.com/repository/apache-snapshots'}
        google()
        jcenter()
        mavenCentral()

    }
    dependencies {
    
    
        classpath 'com.android.tools.build:gradle:3.5.3'
    }
}

AndroidStudio settings
The warehouse address of Alibaba Cloud is: https://maven.aliyun.com/mvn/view
Insert picture description here

Guess you like

Origin blog.csdn.net/poolooloo/article/details/105489908