ThinkSSL🔒 一键申购 5分钟快速签发 30天无理由退款 购买更放心 广告
# 1. 基本配置 ## 1.1 依赖 在`mvn`仓库[https://mvnrepository.com/artifact/](https://mvnrepository.com/artifact/)中查找第三方库,然后添加到该模块的`build.gradle`文件中: ~~~groovy // https://mvnrepository.com/artifact/ implementation 'com.google.code.gson:gson:2.9.0' // retrofit implementation 'com.squareup.retrofit2:retrofit:2.9.0' // gson implementation 'com.google.code.gson:gson:2.9.0' // converter-gson版本要和retrofit一样 implementation 'com.squareup.retrofit2:converter-gson:2.9.0' // okhttp implementation 'com.squareup.okhttp3:okhttp:4.9.3' // 适配retrofit支持rxjava implementation 'com.squareup.retrofit2:adapter-rxjava:2.9.0' ~~~