写个这玩意可费事 ,我是安卓开发的小白我叫菜鸟,欢迎大家能点开我的博客。在这里我们共同成长,最近没事写了这玩意,网上一大堆,我也看不懂。自己试着写了个,来起来就直接复制粘贴的型的代码,希望给像我这样懒得人带来一股清流,废话不多说,开始搞起来:
1.先加个依赖:
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:converter-scalars:2.1.0'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
位置请看图:</