liangjingkanji / Net

Android 基于协程/OkHttp网络请求工具
http://liangjingkanji.github.io/Net/
MIT License
1.9k stars 214 forks source link

在集成1.x的时候post和get、 #75

Closed a1227308812 closed 2 years ago

a1227308812 commented 2 years ago

在1.x的使用中按照文档集成在kotlin'项目中在请求网络的时候直接报错编译不通过怎么回事呢

a1227308812 commented 2 years ago

直接报错提示这个Cannot access class 'io.reactivex.Observable'. Check your module classpath for missing or conflicting dependencies

a1227308812 commented 2 years ago

添加@Suppress("MISSING_DEPENDENCY_CLASS")忽略报错提示后 在编译时就报错这个:Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: class com.drake.net.observer.TryObserver, unresolved supertypes: io.reactivex.Observer, io.reactivex.disposables.Disposable Adding -Xextended-compiler-checks argument might provide additional information.

liangjingkanji commented 2 years ago

因为你没有依赖RxJava

不是很推荐你使用1.x版本, 无论是功能还是稳定性都无法和3.x相提并论, 并且协程比RxJava更简单更强大

liangjingkanji commented 2 years ago

在我这里只有提问者回复慢, 鉴于你长期没有回复本问题将关闭

a1227308812 commented 2 years ago

感谢回复,已处理。这几天在忙其他的没来得及及时回复。

liangjingkanji commented 2 years ago

好的