Retrofit2:adapter-rxjava Certificate issue

ε祈祈猫儿з 提交于 2019-12-24 20:17:10

问题


I have the following dependencies in my android project:

implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation 'com.squareup.okhttp3:okhttp:3.7.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.7'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'

However, the 'com.squareup.retrofit2:adapter-rxjava2:2.4.0' dependency is causing issues or conflicts with the retrofit library. When I make network requests it results in a certificate error. However, when I remove the same dependency everything seems to work fine.


回答1:


Try to use same version of Retrofit dependencies, like for now latest version is 2.5.0

implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'


来源:https://stackoverflow.com/questions/54905331/retrofit2adapter-rxjava-certificate-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!