有没有更简单的方法将gson添加到我的项目中? [英] Is there an easier way to add gson to my project?

查看:49
本文介绍了有没有更简单的方法将gson添加到我的项目中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用gradle将gson添加到我的项目中?我只看到人们在他们的项目中添加文件.我不想下载该项目并将其放入我的项目.

How do I add gson to my project with gradle? I only see people adding files to their projects. I don't want to download the project and put it in mine.

推荐答案

在app/build.gradle中:

In app/build.gradle:

 dependencies {
    compile 'com.google.code.gson:gson:2.8.2'
}

这篇关于有没有更简单的方法将gson添加到我的项目中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆