question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Hi. I’ve tried to inflate this guy on adapter, but don’t work! I’m using the last version.

<com.facebook.drawee.view.SimpleDraweeView
  android:id="@+id/camera_image"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  app:placeholderImage="@mipmap/ic_launcher"/>

android.view.InflateException: Binary XML file line #7: Error inflating class com.facebook.drawee.view.SimpleDraweeView…

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:29 (2 by maintainers)

github_iconTop GitHub Comments

52reactions
andforcecommented, Oct 9, 2015
    <com.facebook.drawee.view.SimpleDraweeView
            android:layout_gravity="center"
            android:layout_height="100dp"
            android:layout_width="100dp"
            android:background="@color/white"
            android:id="@+id/cover"/>
android.view.InflateException: Binary XML file line #13: Error inflating class com.facebook.drawee.view.SimpleDraweeView
            at android.view.LayoutInflater.createView(LayoutInflater.java:620)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)

I hava the same trouble~

Solve Method

You should only call Fresco.initialize once. Your Application class would be a good place. Doing it in each Activity is wrong.

add :Fresco.initialize(this); to your Application class.

42reactions
andforcecommented, Sep 21, 2015

@ppamorim I have solve this problem. add :Fresco.initialize(this); to your Application.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Error inflating class com.facebook.drawee.view ...
In my case writing Fresco.initialize(this); before setContentView(R.layout.myxml); helped me. Update: you have FacebookSdk.sdkInitialize(this); instead of ...
Read more >
Android – Error inflating class com.facebook.drawee.view ...
Android – Error inflating class com.facebook.drawee.view.SimpleDraweeView. androidfacebookfresco. I'm trying to use the fresco library.
Read more >
android.view.InflateException: Binary XML file line #40
android.view.InflateException: Binary XML file line #40: Error inflating class com.facebook.drawee.view.SimpleDraweeView.
Read more >
OSCHINA - 中文开源技术交流社区
error inflating class com.facebook.drawee.view.simpledraweeview. 加载中. 暂无相关内容. OSCHINA 社区. 关于我们 联系我们 加入我们 合作伙伴 Open API. 在线工具.
Read more >
Frscon的报错:Error inflating class com.facebook.drawee ...
报错:android.view.InflateException: Error inflating class com.facebook.drawee.view.SimpleDraweeView原因是没有执行, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found