后来发现是:
The url not be support
搜:
xutils3 The url not be support
xUtils3/UriRequestFactory.java at master · wyouflf/xUtils3 · GitHub
android Xutils Http模块分析 – H291850336的专栏 – 博客频道 – CSDN.NET
if (scheme.startsWith("http")) { return new HttpRequest(params, loadType); } else if (scheme.equals("assets")) { return new AssetsRequest(params, loadType); } else if (scheme.equals("file")) { return new LocalFileRequest(params, loadType); } else { throw new IllegalArgumentException("The url not be support: " + uri); } } } else { throw new IllegalArgumentException("The url not be support: " + uri); } } |
public static UriRequest getUriRequest(RequestParams params, Type loadType) throws Throwable { String uri = params.getUri(); if (uri.startsWith("http")) { return new HttpRequest(params, loadType); } else if (uri.startsWith("assets://")) { if (assetsRequestCls != null) { Constructor<? extends AssetsRequest> constructor = assetsRequestCls.getConstructor(RequestParams.class, Class.class); return constructor.newInstance(params, loadType); } else { return new AssetsRequest(params, loadType); } } else if (uri.startsWith("file:") || uri.startsWith("/")) { return new LocalFileRequest(params, loadType); } else { throw new IllegalArgumentException("The url not be support: " + uri); } } |
之前url是:
dev.jiandao.im:8080/code
[总结]
最后把url改为加上http的前缀,就可以了:
类似于: