Retrofit2 项目配置

在项目的 app  build.gradle 文件中加入

dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.1.2'

// Retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.0.0'
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
}
原文地址:https://www.cnblogs.com/jiayonghua/p/10119143.html