Frscon的报错:Error inflating class com.facebook.drawee.view.SimpleDraweeView

 Error inflating class com.facebook.drawee.view.SimpleDraweeView


原因是没有执行,下面这句话

Fresco.initialize(this);
 
 
 
 
http://www.myexception.cn/mobile/1887068.html
 
 
Fresco 初体验各种问题解决

Fresco 初体验各种问题解决

  • xmlns:fresco="http://schemas.android.com/apk/res-auto"显示为灰色,没有应用到 
    这里写图片描述

    1. 解决办法 

    把引用图片的方式(src)改为:fresco:placeholderImage 
    Frscon的报错:Error inflating class com.facebook.drawee.view.SimpleDraweeView_第1张图片

  • 初始化位置错误

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);上边 
Frscon的报错:Error inflating class com.facebook.drawee.view.SimpleDraweeView_第2张图片


  • 图片不显示 
    Frscon的报错:Error inflating class com.facebook.drawee.view.SimpleDraweeView_第3张图片
    1.解决办法 

Fresco 是不支持wrap_content所以我们把相应的地方改为数值:100dp之类的,更具具体情况定


 
 


你可能感兴趣的:(Frscon的报错:Error inflating class com.facebook.drawee.view.SimpleDraweeView)