- 博客(1)
- 收藏
- 关注
原创 Retrofit使用基础教程
Retrofit使用基础教程 基础依赖:implementation ‘com.squareup.retrofit2:retrofit:2.8.1’ 如果想要用Retrofit获取Json字符串并自动转为Java实例对象,则还需要添加依赖:implementation ‘com.squareup.retrofit2:converter-gson:2.0.2’ 以获取Json字符串为例: 1、创建API接口: public interface API { //使用注解来标明请求类型,并传入主网址下的分级网址(
2020-09-08 21:15:23
396
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人