使用kotlin和Retrofit遇到的问题?

使用kotlin和Retrofit遇到的问题?,第1张

No type arguments expected for class Observable问题解决方法?

首先我使用的 依赖是 如下:

//后期使用retrofit网络访问框架
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
//转换json  挂代理的小心,即使关闭代理可能也会报错。关闭代理后重启AS,估计是AS3.0的bug
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.0.1'
implementation 'io.reactivex:rxandroid:1.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.1.2'//日志

然后发现 我的


报错,无法使用,原来是 导入包出差了,

删除,修改新包就行,如下:

谢谢,真是我的遇到的问题,估计不少接触 kotlin+retrofit的同伴会遇到这个问题。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/733072.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-27
下一篇 2022-04-27

发表评论

登录后才能评论

评论列表(0条)

保存