使用fresco遇到的坑-SimpleDraweeView

问题:

 Caused by: android.view.InflateException: Binary XML file line #20: Binary XML file line #20: Error inflating class com.facebook.drawee.view.SimpleDraweeView

陈科肇

原因:

没用在应用调用 setContentView() 之前进行初始化Fresco造成的;

解决办法:

对Fresco进行初始化Fresco.initialize(this);

@Override
protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Fresco.initialize(this);
    }

参考:http://blog.csdn.net/wyb112233/article/details/49637685

你可能感兴趣的:(Android)