文件名称:Retrofit封装demo
文件大小:4KB
文件格式:JAVA
更新时间:2021-11-07 11:08:12
Retrofit Retrofit封装
Retrofit的简单分装类,将call中的泛型改为需要的实体类然后加入接口就可以直接使用 gradle中需要添加 implementation 'com.squareup.retrofit2:converter-gson:2.0.2' implementation 'com.squareup.retrofit2:converter-jackson:2.0.2' implementation 'com.squareup.retrofit2:converter-simplexml:2.0.2' implementation 'com.squareup.retrofit2:converter-protobuf:2.0.2' implementation 'com.squareup.retrofit2:converter-moshi:2.0.2' implementation 'com.squareup.retrofit2:converter-wire:2.0.2' implementation 'com.squareup.retrofit2:converter-scalars:2.0.2'