Retrofit2.0与RxJava2.0结合出现的问题解决
来源:互联网 发布:淘宝客服外包多少钱 编辑:程序博客网 时间:2024/06/06 07:11
首先添加正确的依赖:
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
依赖不能出错,特别时第一条compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
Retrofit2.0的原依赖是:
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
依赖不能出错,特别时第一条compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
Retrofit2.0的原依赖是:
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
不支持RxJava2.0,所以引用会出现Observable相关adapter的错误,以及Rxjava2.0与1.0的依赖冲突问题,改掉一切都好。
实际应用网上很多,我就不说了,因为大神都说的很详细了,哈哈
阅读全文
0 0
- Retrofit2.0与RxJava2.0结合出现的问题解决
- Retrofit2.0与RXJava2.0最新结合:
- Android 优雅的让RxJava2.0+Retrofit2.0结合使用
- Android 优雅的让RxJava2.0+Retrofit2.0结合使用
- Rxjava2.0和Retrofit2.0结合使用(2)post请求
- Retrofit2.0+Rxjava2 相关的文章
- RxJava2和Retrofit2.0的简单使用
- android Retrofit2.0 RxJava2.0
- Retrofit2.0与Cache-Control的结合使用
- Retrofit2.0的学习以及Rxjava与Retrofit2的结合使用
- 【Android高级】RxJava2.0和Retrofit2.0的使用探究
- RxJava和Retrofit2.0的结合使用
- rxjava2 结合retrofit2进行业务封装
- Retrofit2+Rxjava2联网的封装
- RxJava2 和 Retrofit2 依赖时出现冲突
- Android详细的登录注册功能MVP+Rxjava2.0+Retrofit2.0相结合的实战篇章
- Android-->Rxjava与Retrofit2的结合实战
- RxJava2.0 和 Retrofit 结合使用时的配置问题
- 暴力搜索 寻找鞍点
- SQL语言学习心得
- Redis之对象
- hdu1242 Rescue(BFS +优先队列 or BFS )
- 5、linux常用不太记得住命令
- Retrofit2.0与RxJava2.0结合出现的问题解决
- 表格
- android 获取sha1
- Android studio升级3.0 carry2 出现问题Gradle sync failed: Connection timed out: connect解决办法
- 有关测试需要了解的知识
- 火狐浏览器书签工具栏固定书签宽度
- Strategic Game 【无向图的最小顶点覆盖】
- 二叉树前序、中序、后序递归遍历实现(C语言)
- 有趣的编程----控制自己电脑的CPU