5

Gradle 配置国内镜像

 3 years ago
source link: https://peon.top/show/5
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Gradle 配置国内镜像蜂鸟的小窝
Gradle 配置国内镜像

最近在研究如何写 Android 程序,我装好 Android Studio 后,便创建是一个Hello world 项目试之,但 Gradle 使我等了很久很久,一直跑不完,故我便查了搜索引擎,发现 Gradle 可使用国内源,现记录更换方式。

 局部更换 ,可更改项目中 build.gradle 文件为下文这样 

buildscript {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/google/' }
        maven { url 'https://maven.aliyun.com/repository/jcenter/'}
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }        
}

allprojects {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/google/' }
        maven { url 'https://maven.aliyun.com/repository/jcenter/'}
    }
}



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK