zoukankan      html  css  js  c++  java
  • DefaultHttpClient 在oppo A57手机上网络请求报错

    使用的库是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)

  • 相关阅读:
    【QT】Linux下安装QT开发环境
    【C#】Winform嵌入dll到exe中
    使用maven插件构建docker镜像并推送到阿里镜像仓库
    蓝牙耳机连接 win10音量异常
    max virtual memory areas vm.max_map_count [65530] is too low
    docker 安装 confluence
    jenkins docker push脚本
    docker 删除指定名称的所有容器
    docker 安装 xxl-job-admin
    docker 安装 sentinel
  • 原文地址:https://www.cnblogs.com/lucktian/p/9166422.html
Copyright © 2011-2022 走看看