怎么从MavenCentre和JCenter上自动获取你要的依赖

1.去网站搜索你需要依赖的gradle引用地址

JCenter

https://bintray.com/bintray/jcenter

MavenCenter

http://mvnrepository.com/

2.更改项目build.gradle JCenter/mavenCentral

repositories {
    jcenter()
}
3.在你需要使用的app中添加该地址
dependencies {
    compile fileTree(dir: 'libs',include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.facebook.fresco:fresco:0.9.0'
}
4.build

相关文章

什么是设计模式一套被反复使用、多数人知晓的、经过分类编目...
单一职责原则定义(Single Responsibility Principle,SRP)...
动态代理和CGLib代理分不清吗,看看这篇文章,写的非常好,强...
适配器模式将一个类的接口转换成客户期望的另一个接口,使得...
策略模式定义了一系列算法族,并封装在类中,它们之间可以互...
设计模式讲的是如何编写可扩展、可维护、可读的高质量代码,...