码迷,mamicode.com
首页 > 移动开发 > 详细

DefaultHttpClient 在oppo A57手机上网络请求报错

时间:2018-06-11 13:42:50      阅读:275      评论:0      收藏:0      [点我收藏+]

标签:ref   seq   opp   prot   cal   nbsp   worker   网络   and   

 

使用的库是xutils2.6.14,oppo A57 上调试的时候,请求接口时报错,但是其他手机都正常;

com.lidroid.xutils.exception.HttpException:
java.io.IOException: Attempt to invoke virtual method ‘boolean java.lang.String.contains(java.lang.CharSequence)‘ on a null object reference

接入xutils2.6.14源码库查看报错是:

06-11 11:37:20.792 W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean java.lang.String.contains(java.lang.CharSequence)‘ on a null object reference
06-11 11:37:20.794 W/System.err: at org.apache.http.protocol.RequestUserAgent.process(RequestUserAgent.java:83)
06-11 11:37:20.794 W/System.err: at org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcessor.java:295)
06-11 11:37:20.794 W/System.err: at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:165)
06-11 11:37:20.794 W/System.err: at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:418)
06-11 11:37:20.794 W/System.err: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
06-11 11:37:20.795 W/System.err: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
06-11 11:37:20.795 W/System.err: at com.lidroid.xutils.http.HttpHandler.sendRequest(HttpHandler.java:125)
06-11 11:37:20.795 W/System.err: at com.lidroid.xutils.http.HttpHandler.doInBackground(HttpHandler.java:181)
06-11 11:37:20.795 W/System.err: at com.lidroid.xutils.http.HttpHandler.doInBackground(HttpHandler.java:40)
06-11 11:37:20.795 W/System.err: at com.lidroid.xutils.task.PriorityAsyncTask$1.call(PriorityAsyncTask.java:67)
06-11 11:37:20.795 W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-11 11:37:20.795 W/System.err: at com.lidroid.xutils.task.PriorityRunnable.run(PriorityRunnable.java:16)
06-11 11:37:20.795 W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
06-11 11:37:20.795 W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
06-11 11:37:20.795 W/System.err: at java.lang.Thread.run(Thread.java:818)

DefaultHttpClient 在oppo A57手机上网络请求报错

标签:ref   seq   opp   prot   cal   nbsp   worker   网络   and   

原文地址:https://www.cnblogs.com/lucktian/p/9166422.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!