【报错】retry error curr request is null

在使用xUtils框架(android的一个优秀框架)时,在访问网络时,使用HttpUtils类的send方法时,callback参数报错

retry error curr request is null

大概是说 request是null,可能是因为第三方框架的封装,详细的异常没有报出来,经过检查,发现问题

网络访问的受限

解决:

1、AndroidManifest.xml添加权限  

<uses-permission android:name="android.permission.INTERNET"/>


2、地址问题

<String> HttpHandler<String> com.lidroid.xutils.HttpUtils.send(HttpMethod method, String url, RequestParams params, RequestCallBack<String> callBack)

这里面的 String url  不写 "http://" 或者 “https://" 等URL支持的协议格式头 ,会出现上述报错。

3、版本问题

xUtils框架 2.6.14以前的版本在android 5.0及以上设备上运行时会报些错误,请使用新版本的xUtils

你可能感兴趣的:(android,dean,xutils)