Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 毕加索url不加载_Android_Picasso - Fatal编程技术网

Android 毕加索url不加载

Android 毕加索url不加载,android,picasso,Android,Picasso,我有一个动态的url为用户显示头像 图像确实显示在浏览器中,但毕加索没有显示任何图像 使用当前代码: getPicasso().load("http://www.dapptapp.com/contents/avatar/200/200/27.png").into(civAvatar); 它是否与图像的标题或其他内容有关。我似乎不能准确地指出错误。如果我使用任何其他来自网络的常规图像,就没有问题 URL上的邮递员响应: Connection →Keep-Alive Content-Encod

我有一个动态的url为用户显示头像

图像确实显示在浏览器中,但毕加索没有显示任何图像

使用当前代码:

 getPicasso().load("http://www.dapptapp.com/contents/avatar/200/200/27.png").into(civAvatar);
它是否与图像的标题或其他内容有关。我似乎不能准确地指出错误。如果我使用任何其他来自网络的常规图像,就没有问题

URL上的邮递员响应:

Connection →Keep-Alive
Content-Encoding →
Content-Encoding
The type of encoding used on the data.

gzip
Content-Length →36908
Content-Type →image/png
Date →Tue, 03 Jun 2014 14:44:22 GMT
Keep-Alive →timeout=1, max=100
Server →Apache
Vary →Accept-Encoding,User-Agent

我也遇到了这个问题

如果未提供ok http lib,毕加索将使用UrlConnectionDownloader加载url

似乎有时它加载url时使用参数boolean localCacheOnly=true,并且头设置为HttpUrlConnection

connection.setUseCaches(true)
connection.setRequestProperty("Cache-Control", "only-if-cached,max-age=" + Integer.MAX_VALUE);
然后返回此标题:

X-Android-Response-Source CACHE 504

由毕加索修订并注释这些行。我认为可能会有更好的解决方案。

您的意思是说其他图像url正在工作,只有此url不工作?@Toby我需要对此进行调查。看起来此url引发了504网关超时。@Toby服务器返回内容长度为0的响应。我想这就是问题所在。@Toby你能试试2.3.2吗?它现在正在上线,所以可能需要几个小时才能在maven central上线。