Skip to content

Instantly share code, notes, and snippets.

@klkucan
Forked from shau-lok/add local aar file.md
Created November 17, 2017 05:40
Show Gist options
  • Save klkucan/19a20027a7735cd92f547e39b330605d to your computer and use it in GitHub Desktop.
Save klkucan/19a20027a7735cd92f547e39b330605d to your computer and use it in GitHub Desktop.
Android Studio add local .aar reference

Add local .aar file

  1. basic build.gradle directory using flatDir
repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'
    }
}
  1. app/build.gradle
//way1:
dependencies {
   compile 'com.kevinpelgrims.library:library:1.0.0@aar'
}

//or way2: store the .aar file in libs
dependencies {
    compile(name:'libraryfilename', ext:'aar')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment