Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FynnJason opened this issue Apr 18, 2017 · 1 comment
Open

Comments

@FynnJason
Copy link

出现这个原因在网上搜了一下,于是调用Fresco.initialize(this);来初始化,于是不会报错,但是图片不显示出来,只有一个背景阴影色。

@wallyperry
Copy link

在你的Application里初始化这些内容:

    Fresco.initialize(this);
    DisplayMetrics dm = getResources().getDisplayMetrics();
    DisplayUtil.density = dm.density;
    DisplayUtil.densityDPI = dm.densityDpi;
    DisplayUtil.screenWidthPx = dm.widthPixels;
    DisplayUtil.screenhightPx = dm.heightPixels;
    DisplayUtil.screenWidthDip = DisplayUtil.px2dip(getApplicationContext(), dm.widthPixels);
    DisplayUtil.screenHightDip = DisplayUtil.px2dip(getApplicationContext(), dm.heightPixels);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants