网络请求相关依赖库

网络相关依赖库

    //请求网络相关
    //okhttp
    //https://github.com/square/okhttp
    implementation 'com.squareup.okhttp3:okhttp:4.2.0'

    //用来打印okhttp请求日志
    //当然也可以自定义
    implementation("com.squareup.okhttp3:logging-interceptor:4.2.0")

    //retrofit
    //https://github.com/square/retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.6.2'

    //使用gson解析json
    //https://github.com/google/gson
    implementation 'com.google.code.gson:gson:2.8.5'

    //适配retrofit使用gson解析
    //版本要和retrofit一样
    implementation 'com.squareup.retrofit2:converter-gson:2.6.2'

    //适配retrofit支持rxjava
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2'
    /**
     * 注意:retrofit gson adapter-rxjava2 的版本号一样,防止出错
     */
     
 //使用了Android响应式编程
    //RxJava和RxAndroid区别?
    //简单来说:就是RxAndroid在RxJava的基础上
    //优化了一些功能
    //增强了Android特有的功能
    //https://github.com/ReactiveX/RxAndroid
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值