一、android studio aar 添加依赖

这里以添加rxandroid 这个aar为例说明android studio添加aar的步骤。

Android Studio 引用依赖库

在上图的build.gradle中添加以下代码

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile (name:'rxandroid-1.2.0',ext:'aar')//你需要修改的是文件的名字也就是'rxandroid-1.2.0'这一部分
}
repositories {
    flatDir {
        dirs 'libs'
    }
}
然后点击同步就可以了。
验证添加是否正确?


在这个目录下找到你添加的文件就好了。

转载自:https://blog.csdn.net/u010693827/article/category/7613678

相关文章:

  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
  • 2022-01-22
  • 2021-11-25
  • 2021-07-28
猜你喜欢
  • 2021-07-18
  • 2022-01-07
  • 2021-11-03
  • 2021-12-01
  • 2022-02-20
  • 2022-12-23
  • 2022-01-23
相关资源
相似解决方案