Retrofit——下载
来源:互联网 发布:武汉茶港大院 知乎 编辑:程序博客网 时间:2024/06/18 10:30
今天讲Retrofit下载,包括jar形式、Maven形式、Gradle形式。另外,提供Retrofit的GitHub地址,再讲下Retrofit的混淆。
Retrofit jar下载及配置:
Retrofit 的jar(V2.3.0)下载地址,点这里。
Retrofit的Maven配置:
<dependency> <groupId>com.squareup.retrofit2</groupId> <artifactId>retrofit</artifactId> <version>2.3.0</version></dependency>
Retrofit的Gradle配置:
compile 'com.squareup.retrofit2:retrofit:2.3.0'
Retrofit要求在java 7和android2.3以上运行。
Retrofit的Github地址:
https://github.com/square/retrofit
Retrofit混淆:
如果你在你的工程中使用ProGuard来混淆,你需要添加下面的这些配置。
# Platform calls Class.forName on types which do not exist on Android to determine platform.-dontnote retrofit2.Platform# Platform used when running on Java 8 VMs. Will not be used at runtime.-dontwarn retrofit2.Platform$Java8# Retain generic type information for use by reflection by converters and adapters.-keepattributes Signature# Retain declared checked exceptions for use by a Proxy instance.-keepattributes Exceptions
Retrofit使用OKio作为网络请求引擎,因此,你还需要了解它的ProGuard规则。见参考网址:
https://github.com/square/okio#proguard
阅读全文
0 0
- Retrofit——下载
- Retrofit(重构——下载大文件)
- Retrofit下载
- Retrofit——Cookie
- Retrofit——Cache
- Retrofit——简介
- rxjava retrofit 下载
- Retrofit下载文件
- android Retrofit下载图片
- Retrofit下载文件
- retrofit下载进度
- Retrofit下载文件进度
- Retrofit多线程下载
- MVP Retrofit多线程下载
- Retrofit+多线程下载
- Retrofit多线程断点下载
- Retrofit——API声明
- Retrofit——API配置
- 看门狗的认识
- JS判断输入类型是否为正整数
- 深入理解:面向服务与微服务架构
- Arcgis API for JS 地图小部件
- java el表达式笔记
- Retrofit——下载
- 服务篇三---svn服务
- OpenGL游戏引擎实现与OpenGL/DirectX 图形学
- ZCL 规范
- 曲线拟合
- 数据结构基本概念
- Flex 布局整理【全】
- interview20170815
- 【并查集】并查集实现原理以及应用