希望你做得好,我正在开发一个应用程序,因为我想从 url 加载图像到 imageView,为此我使用了 Picasso lib,但它给了我未捕获的异常,我已经检查和调试因为是否有正确的 url 是否出现并且它是完美的,我仍然面临这个问题,有人可以帮我解决这个问题吗?我的代码如下: 代码
Picasso.with(NewProfileActivity.this)
.load(mUser.userAvatarPath)
.into(iv_profile);
这里"iv_profile"是imageView,mUser.userAvatar Path是图片url。
最佳答案
试试这个
Picasso.with(this).load("http://api.androidhive.info/json/movies/1.jpg").placeholder(getResources().getDrawable(R.drawable.ic_launcher)).into(imageViewCenter);
关于android - 无法使用 picasso 库在android中加载图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37111009/