【发布时间】:2020-07-14 04:24:59
【问题描述】:
我在使用 Picasso 库时遇到问题。当我使用这个库 (implementation 'com.squareup.picasso:picasso:2.71828') 时,我的图像不会显示在图像视图中。运行我的应用程序时,甚至默认头像也会被删除。
我的密码是
try {
//if image recieve then set
Picasso.get().load(image).into(avaterIv);
}catch (Exception e){
//if there is any exception while loading image the set default
Picasso.get().load(R.drawable.ic_add_image).into(avaterIv);
}
【问题讨论】:
-
请提供布局xml,并说明您从什么函数调用此代码?
-
\\如果我的答案有效..请将其标记为已接受的答案..提前致谢
标签: java android imageview picasso