Retrofit API call receives “HTTP FAILED: java.io.IOException: Canceled”

前端 未结 4 958
难免孤独
难免孤独 2021-01-01 09:58

Can\'t figure out why is this happening. Neither one of rx callbacks (onCompleted(), onError(), onNext()) not gets triggered by my call. The only thing i receive is this okh

4条回答
  •  感情败类
    2021-01-01 10:32

    What helped to me is to replace deprecated call adapter:

    implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
    

    with:

    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'
    

    This helped me with this issue and I get onError() called every time. More info on this: https://github.com/JakeWharton/retrofit2-rxjava2-adapter

提交回复
热议问题