The best way to integrate third party library in Android studio

后端 未结 4 903
误落风尘
误落风尘 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:11

    Download and copy your jar to libs folder then add the following to your app.gradle file and SYNC.

    dependencies {
         compile 'com.google.code.gson:gson:{version_you_need}'
    }
    
    repositories{
      flatDir{
          dirs 'libs'
      }
    }
    

提交回复
热议问题