如何使用Gson(添加到項目裏去)

轉載自http://www.th7.cn/Program/Android/201603/783377.shtmlhtml

 

方法一:gradle

1.在Android Studio中按F4快捷鍵進入Project Structureui

2點擊+號google

.code

3.選擇Library dependencyhtm

4.搜索GSONio

5.添加進去搜索

方法二:方法

在buil的.gradle中輸入im

 

compile 'com.google.code.gson:gson:2.6.2'

--------------------------------------------------------------------------------

 

綜上就會看到添加成功

-----------------------------

GSON的使用難點在類的建立

使用的話簡簡單單幾行代碼搞定

相關文章
相關標籤/搜索