target not be null
来源:互联网 发布:各年度网络十大热词 编辑:程序博客网 时间:2024/05/23 01:17
1url中没有“http://”
2如果你是用picasso导致的这个问题,那么首先检查URL,再者去检查控件(比如imagview)是否是空的。
private void setUserAvatar(EMMessage message, final ImageView imageView) {
try {
String avatorUrl = message.getStringAttribute(ConstantInfo.CESUAN_IMAGRURL);
Log.e(TAG, "setUserAvatar " + avatorUrl);
if (imageView != null) {
Picasso.with(context).load(avatorUrl).resize(150, 150).centerCrop().into(imageView);
}
} catch (EaseMobException e) {
e.printStackTrace();
}
}
比如我的这个问题,在于加上了final 导致imageview无法动态加载(我的这行代码是加载聊天头像的,会随着发送的消息类型去viewholder中加载不同的控件)。
0 0
- target not be null
- Target host must not be null /// host name may not be null 处理
- java.lang.IllegalStateException: Target host must not be null, or set in parameters.
- Caused by: java.lang.IllegalStateException: Target host must not be null, or set in parameters.
- java.lang.IllegalStateException: Target host must not be null, or set in parameters.
- Error: Target host must not be null, or set in parameters
- HttpClient:Target host must not be null, or set in parameters
- 解决Target host must not be null, or set in parameters.
- java.lang.IllegalStateException: Target host must not be null, or set in parameters. scheme=null, ho
- Caused by: java.io.IOException: Target host must not be null, or set in parameters. scheme=null
- 在发送请求时 java.lang.IllegalStateException: Target host must not be null, or set in parameters. scheme=n
- 网络访问过程中遇到的java.io.IOException: Target host must not be null的问题
- 网络访问过程中遇到的java.io.IOException: Target host must not be null的问题
- ssh 报错 Target can not null
- To Be of Not To Be ,or to Be Null
- hbase phoenix char may not be null
- WebLogicDeployableObject' may not be null的问题
- [CAQ1]Exception : name may not be null
- ios 微信分享,QQ分享,微博分享集成
- 第2章 分支出12章 第1章汇编概念
- UESTC 482 Charitable Exchange(优先队列+bfs)
- HDU 1166
- LoadRunner 问题总结
- target not be null
- Android笔记 Activity和Service的通信
- PowerDesigner使用之设计数据库
- 图解Windows下QT编程入门
- android studio配置OpenCV
- Python-OpenCV 杂项(一):图像绘制
- TextView实战之你真的懂我么?
- Cookie跨域
- NYOJ 题目214 单调递增子序列(二) dp+二分