Git Product home page Git Product logo

rxjavaretrofitdemo-string-master's People

Contributors

wzgiceman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rxjavaretrofitdemo-string-master's Issues

使用Gson代替Fastson进行json转换的时候,出现 Expected a string but was BEGIN_OBJECT

楼主,我使用你这一个的时候,使用Gson的时候,包以下错误
Expected a string but was BEGIN_OBJECT
查阅了相关资料,知道是Gson不支持将Object对象的直接转化为String,请问您楼主有什么比较好的解决方法吗,谢谢

public class BaseResultEntity {
// 判断标示
private int ret;
// 提示信息
private String msg;
//显示数据(用户需要关心的数据)
private String data;
}

多个接口问题

项目中有上百个接口,就需要写对应多个像SubjectPostApi这样的类,是不是有点臃肿了?我修改了用反射的方法去做,请求时只用这一个类即可,但是感觉不太好,有没有其他方法去优化?

BUG-->OkHttpClient.addInterceptor

HttpManager

 OkHttpClient.Builder builder = new OkHttpClient.Builder();
  **builder.addInterceptor(new CacheInterceptor());**

给okhttp添加拦截器后,就获取不到数据了
有网、没网 都提示:错误:无缓存。

取消okhttp拦截器后,还是提示:错误:无缓存。

重新安装 一样

else

换个手机不加拦截器运行 就可以获取到数据。。

错误

java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:59)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:153)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.NoClassDefFoundError: okhttp3.internal.http.HttpEngine
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:219)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.wzgiceman.rxretrofitlibrary.retrofit_rx.http.cookie.CookieInterceptor.intercept(CookieInterceptor.java:36)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
at okhttp3.RealCall.execute(RealCall.java:69)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:174)

无法运行

import com.wzgiceman.rxretrofitlibrary.retrofit_rx.http.cookie.DaoMaster;
import com.wzgiceman.rxretrofitlibrary.retrofit_rx.http.cookie.DaoSession;
没有这个东西

请教

大佬 你这个什么时候升级到 Rxjava Rxandroid 到2.0 啊

兄弟,你用的rxjava实际上还是1.x版本,升级到2.x版本后一些包名和类名变化了

/*rxjava2.x版本*/
api 'io.reactivex.rxjava2:rxjava:2.2.7'
api 'io.reactivex.rxjava2:rxandroid:2.1.1'
/*rxlifecycle依赖的是rxjava1.x版本*/
//api 'com.trello:rxlifecycle:1.0'
//api 'com.trello:rxlifecycle-components:1.0'
/*rxlifecycle依赖的是rxjava2.x版本*/
api 'com.trello.rxlifecycle2:rxlifecycle:2.2.2'
api 'com.trello.rxlifecycle2:rxlifecycle-android-lifecycle:2.2.2'
/*adapter-rxjava依赖的是rxjava1.x版本,adapter-rxjava2依赖的是rxjava2.x版本*/
api 'com.squareup.retrofit2:retrofit:2.5.0'
//api 'com.squareup.retrofit2:adapter-rxjava:2.5.0'
api 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
api 'com.squareup.retrofit2:converter-scalars:2.5.0'
api 'com.squareup.retrofit2:converter-gson:2.5.0'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.