Adding external library in Android studio

前端 未结 19 1129
面向向阳花
面向向阳花 2020-11-22 05:51

I want to add external library https://github.com/foursquare/foursquare-android-oauth to my Android application (I use Android Studio, the instructions provided by lib autho

19条回答
  •  再見小時候
    2020-11-22 06:12

    1. In the repositories section of the project's build.gradle add the following:
    flatDir { dirs 'aars' } 
    
    1. In your dependencies section of build.gradle add the following:

    compile '[group id]:[artifact id]:[version]@aar'

    replacing [group id] etc with the various lib attributes

    1. create a sub directory aars under your project directory

    2. Copy the [youlibrary].aar to the subdirectory created in 3. above.

    3. Build & Enjoy!

提交回复
热议问题