(1) 将aar文件复制、粘贴到app/libs
目录中
(2) 修改app下的build.gradle配置文件
AS 3.0之前:
...
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.0'
compile(name:'pullrefreshlibrary', ext:'aar') //引用第三方库
...
}
repositories {
flatDir {
dirs 'libs'
}
}
AS 3.0之后:
...
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:25.0.0'
implementation(name:'pullrefreshlibrary', ext:'aar') //引用第三方库
...
}
...
(3) 同步更新Gradle (Sync now)