Android Studio: Add jar as library?

后端 未结 30 2378
天命终不由人
天命终不由人 2020-11-21 05:54

I\'m trying to use the new Android Studio but I can\'t seem to get it working correctly.

I\'m using the Gson library to serialize/deserialize JSON-o

30条回答
  •  鱼传尺愫
    2020-11-21 06:45

    In Android Stuido, I like use Gradle to manage Gson lib.

    Add below dependency in your build.gradle file.

    repositories {mavenCentral()}
    
    dependencies {compile 'com.google.code.gson:gson:2.2.4'}
    

    Everything is OK.

    You can also see this post. The best way to integrate third party library in Android studio

提交回复
热议问题