xmlns:fresco="http://schemas.android.com/apk/res-auto"显示为灰色,没有应用到
把引用图片的方式(
src
)改为:fresco:placeholderImage
初始化位置错误
Error inflating class com.facebook.drawee.view.SimpleDraweeView
android.view.InflateException: Binary XML file line #14: Error inflating class com.facebook.drawee.view.SimpleDraweeView
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.NullPointerException
at com.facebook.drawee.view.DraweeView.setImageDrawable(DraweeView.java:140)
这里是没有引用到`com.facebook.drawee.view.SimpleDraweeView
1.解决办法
把初始化Fresco调整到
setContentView(R.layout.activity_main);
上边
Fresco 是不支持
wrap_content
所以我们把相应的地方改为数值:100dp
之类的,更具具体情况定
原文地址:http://blog.csdn.net/yy1300326388/article/details/45023489