Skip to content

Instantly share code, notes, and snippets.

@shau-lok
Last active January 20, 2022 08:23
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save shau-lok/1cc62ace835ffa8ff460 to your computer and use it in GitHub Desktop.
Save shau-lok/1cc62ace835ffa8ff460 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')
}
@AdnanTheEntertainer
Copy link

How to upload local AAR file to github and then reference as dependency from android studio project?
Just like this
compile 'com.kevinpelgrims.library:library:1.0.0**@aar**'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment