dependencies中添加
这里是直接添加retrofit2.0版本
也可以按shift+ctrl+alt+s(as windows版)
搜索添加
compile 'com.squareup.retrofit2:retrofit:2.1.0'
//将网络请求转化成java bean对象 也可以自定义
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:converter-scalars:2.0.0'
//retrofit和rxandroid连接
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
//将网络请求转化成java bean对象 也可以自定义
Gson - com.squareup.retrofit2:converter-gson
Jackson - com.squareup.retrofit2:converter-jackson
Moshi - com.squareup.retrofit2:converter-moshi
Protobuf - com.squareup.retrofit2:converter-protobuf
Wire - com.squareup.retrofit2:converter-wire
Simple Framework - com.squareup.retrofit2:converter-simpleframework
Scalars - com.squareup.retrofit2:converter-scalars
LoganSquare - com.github.aurae.retrofit2:converter-logansquare
FastJson - org.ligboy.retrofit2:converter-fastjson or org.ligboy.retrofit2:converter-fastjson-android