Android Studio: Add jar as library?

后端 未结 30 2385
天命终不由人
天命终不由人 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:43

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

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.google.code.gson:gson:2.3.1'
    }
    

    Do not forget to click "Sync now"

提交回复
热议问题