The best way to integrate third party library in Android studio

后端 未结 4 907
误落风尘
误落风尘 2020-12-04 17:55

We can find some very good open source libraries for android. I want to know what is the best way to integrate them to our own projects in Android studio. Here are some basi

4条回答
  •  我在风中等你
    2020-12-04 18:13

    Download & Copy Your .jar file in libs folder then adding one line to build.gradle:

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar']) ----> AS creates this
        compile 'com.google.code.gson:gson:2.3.4'   ----------> I added this one
    }
    

    Do not forget to click "Sync now"

    I´m using Android Studio 1.1.0

提交回复
热议问题