}
**4.**在app目录下的build.gradle中使用
dependencies {
compile fileTree(include: [’*.jar’], dir: ‘libs’)
compile “com.android.support:cardview-v7:${APPCOMPAT_VERSION}”
compile “com.android.support:appcompat-v7:${APPCOMPAT_VERSION}”
compile “com.android.support:design:${APPCOMPAT_VERSION}”
compile ‘com.github.bumptech.glide:glide:3.7.0’
}
方式二(推荐)
**1.**在根目录下的build.gradle文件下添加 ext{ … } 中的内容
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
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 {