久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何將 Gson 附加功能添加到 Android 項目?

How to add Gson extras to an Android project?(如何將 Gson 附加功能添加到 Android 項目?)
本文介紹了如何將 Gson 附加功能添加到 Android 項目?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在使用 gson 解析器(最新版本 -> 2.8.2).

I am using gson parser (latest version -> 2.8.2).

我想使用 RuntimeTypeAdapterFactory 這是 gson extras 的一部分.

I would like to use RuntimeTypeAdapterFactory which is part of the gson extras.

在我的 build.gradle 中,目前只有一個編譯指令:

In my build.gradle there is currently a single compile directive:

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

然而,這給了我只有 gson 庫沒有額外的(RuntimeTypeAdapterFactory 在項目中無法識別......).

However this gives me only the gson lib without the extras (RuntimeTypeAdapterFactory is not recognized in the project...).

我查看了 gson extras 的 pom 文件(https://github.com/google/gson/blob/master/extras/pom.xml)和嘗試將以下行添加到我的構建 gradle:

I have looked at gson extras' pom file (https://github.com/google/gson/blob/master/extras/pom.xml) and tried to add below line to my build gradle:

compile 'com.google.code.gson:gson-extras:2.8.2'

但 gradle 只是不會編譯 gson 附加功能:

But gradle just won't compile the gson extras:

"Error:Failed to resolve: com.google.code.gson:gson-extras:2.8.2"

任何想法如何使這項工作?

Any Idea how to make this work?

非常感謝您在此問題上的時間和幫助.

Thank you very much for your time and assistance in this matter.

推薦答案

錯誤:無法解決:com.google.code.gson:gson-extras:2.8.2

Error:Failed to resolve: com.google.code.gson:gson-extras:2.8.2

額外的包未在 Maven 中發布.

您可以檢查這些問題:

  • https://github.com/google/gson/issues/1104
  • https://github.com/google/gson/issues/1123

如您所見,此包尚未發布,使用其中的類的最佳方法是在您的項目中包含源代碼.

As you can read this package is not published and the best way to use the classes inside is just to include source-code in your project.

這篇關于如何將 Gson 附加功能添加到 Android 項目?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 久久宗合色 | 性色在线 | 免费在线观看一区二区 | 亚洲男人的天堂网站 | 精品视频在线观看 | 亚洲精品视频在线播放 | 欧美xxxx做受欧美 | 精品综合网 | 99久久婷婷国产综合精品电影 | 特黄特黄a级毛片免费专区 av网站免费在线观看 | 超碰综合 | 在线播放一区二区三区 | 男女羞羞视频免费看 | 红桃成人在线 | 男人影音| 日韩高清一区二区 | 精品99在线| 天天宗合网 | 亚洲啪啪一区 | 欧美夜夜| 狠狠做六月爱婷婷综合aⅴ 国产精品视频网 | 国产精品久久久久久久粉嫩 | 无吗视频 | 欧美一级免费看 | 天天操网| 成人在线观看网站 | 成人在线免费观看av | av天天干 | 二区久久 | 欧美一a一片一级一片 | 在线一区视频 | 久久精品成人热国产成 | 91精品国产综合久久久久蜜臀 | 欧美a级网站 | 久久精品一区二区三区四区 | 九九热免费在线观看 | 另类视频在线 | 久久久女 | 中文字幕一区二区三区不卡 | 99视频久 | 国产成人亚洲精品 |