Android Studio: Add jar as library?

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

    Unlike Eclipse we don't need to download jar and put it in /libs folder. Gradle handles these things we only need to add Gradle dependencies, Gradle downloads it and puts in gradle cache.

    We need to add dependencies as:

    dependencies {implementation 'com.google.code.gson:gson:2.2.4'}

    thats it However we can also download jar & add that as library but the best practice is to add Gradle dependencies.

提交回复
热议问题