Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/204.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/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 未加载毕加索图像_Android_Picasso - Fatal编程技术网

Android 未加载毕加索图像

Android 未加载毕加索图像,android,picasso,Android,Picasso,这是从线程扩展而来的: 现在的新问题是毕加索没有正确加载图像。如果我硬编码图像url,那么图像将重复显示 @Override public View getView(int position, View convertView, ViewGroup parent) { if(convertView == null) { //Inflate the XML based Layout LayoutInflater inflater = (LayoutIn

这是从线程扩展而来的:

现在的新问题是毕加索没有正确加载图像。如果我硬编码图像url,那么图像将重复显示

@Override
public View getView(int position, View convertView, ViewGroup parent) {

    if(convertView == null) {
        //Inflate the XML based 

Layout
        LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        convertView = inflater.inflate(R.layout.movies_item, parent, false);
}

//Get the ImageView
ImageView movieThumbnail = (ImageView) convertView.findViewById(R.id.movies_item_thumbnail);

//Load Image into the ImageView
Picasso.with(context).load(movies.get(position).getThumbnail()).into(movieThumbnail);

//When I hardcode the url, the image shows as shown in the screenshot below       
//Picasso.with(context).load("http://image.tmdb.org/t/p/w500/nBNZadXqJSdt05SHLqgT0HuC5Gm.jpg").into(movieThumbnail);
Log.v("Populating", movies.get(position).getThumbnail());

return convertView;
}
我完全迷路了。它也不会抛出任何错误。救命啊

[更新] 请参考此链接了解解决方案

我们试着用这个

movies.get(position).getThumbnail().toString()

并确保您的URL完整

我将以这种方式尝试我的代码。。 毕加索.withctx.loadString.valueOfimages.getposition.errorR.drawable.scorpion.intoserve_dish_iv;这里变量图像是ArrayList变量。。这样试试


毕加索.withcontext.loadmovies.getposition.GetHumbnail.errorR.drawable‌​.defulticon.intoMovietHumbail


如果任何图像不可用,则显示默认图像。。如果有任何问题,请询问我。

调试器是您的朋友。movies.getposition.getThumbnail是有效的URL吗?getThumbnail已经返回了一个字符串,我检查了每个URL。它们都是正确的。毕加索。withcontext.loadmovies.getposition.GetHumbnail.errorR.drawable.defulticon.intomovieThumbnail;终于有了一些进步!将显示默认图像。但我不明白为什么图像缩略图URL不起作用。URL是正确的,我尝试在浏览器中打开它们。它们显示得很好,好的。。如果你不知道,我给你提建议。。请再次检查您的URL。。我认为URL不正确如果你对我的答案满意。。请在这个答案上打勾。。因为我们未来的朋友会被跟踪,并以正确的方式得到答案。这不是url问题。我终于在这里找到了答案