android.view.InflateException: Binary XML file line #40: Error inflating class com.facebook.drawee.view.SimpleDraweeView
See original GitHub issue09-05 18:08:08.701: E/AndroidRuntime(25531): android.view.InflateException: Binary XML file line #40: Error inflating class com.facebook.drawee.view.SimpleDraweeView 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.LayoutInflater.createView(LayoutInflater.java:639) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:749) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.LayoutInflater.rInflate(LayoutInflater.java:812) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.LayoutInflater.rInflate(LayoutInflater.java:815) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.LayoutInflater.inflate(LayoutInflater.java:510) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.LayoutInflater.inflate(LayoutInflater.java:420) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.LayoutInflater.inflate(LayoutInflater.java:371) 09-05 18:08:08.701: E/AndroidRuntime(25531): at io.moodbox.module.mood.adapter.MoodTimelineListAdapter.getView(MoodTimelineListAdapter.java:68) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.AbsListView.obtainView(AbsListView.java:2572) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.ListView.makeAndAddView(ListView.java:1953) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.ListView.fillDown(ListView.java:754) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.ListView.fillFromTop(ListView.java:819) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.ListView.layoutChildren(ListView.java:1748) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.AbsListView.onLayout(AbsListView.java:2332) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.View.layout(View.java:16112) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewGroup.layout(ViewGroup.java:5185) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:543) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.View.layout(View.java:16112) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewGroup.layout(ViewGroup.java:5185) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.FrameLayout.onLayout(FrameLayout.java:574) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.View.layout(View.java:16112) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewGroup.layout(ViewGroup.java:5185) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.FrameLayout.onLayout(FrameLayout.java:574) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.View.layout(View.java:16112) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewGroup.layout(ViewGroup.java:5185) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.LinearLayout.onLayout(LinearLayout.java:1722) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.View.layout(View.java:16112) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewGroup.layout(ViewGroup.java:5185) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.FrameLayout.onLayout(FrameLayout.java:574) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.View.layout(View.java:16112) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewGroup.layout(ViewGroup.java:5185) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.LinearLayout.onLayout(LinearLayout.java:1722) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.View.layout(View.java:16112) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewGroup.layout(ViewGroup.java:5185) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.widget.FrameLayout.onLayout(FrameLayout.java:574) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.View.layout(View.java:16112) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewGroup.layout(ViewGroup.java:5185) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2525) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2217) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1314) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6673) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:800) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.Choreographer.doCallbacks(Choreographer.java:603) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.Choreographer.doFrame(Choreographer.java:572) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.os.Handler.handleCallback(Handler.java:815) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.os.Handler.dispatchMessage(Handler.java:104) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.os.Looper.loop(Looper.java:194) 09-05 18:08:08.701: E/AndroidRuntime(25531): at android.app.ActivityThread.main(ActivityThread.java:5824) 09-05 18:08:08.701: E/AndroidRuntime(25531): at java.lang.reflect.Method.invoke(Native Method) 09-05 18:08:08.701: E/AndroidRuntime(25531): at java.lang.reflect.Method.invoke(Method.java:372) 09-05 18:08:08.701: E/AndroidRuntime(25531): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1010) 09-05 18:08:08.701: E/AndroidRuntime(25531): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) 09-05 18:08:08.701: E/AndroidRuntime(25531): Caused by: java.lang.reflect.InvocationTargetException 09-05 18:08:08.701: E/AndroidRuntime(25531): at java.lang.refle
Here is my layout.xml for ListView item(R.layout.lstv_mood_timeline_item)…
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:fresco="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/white" >
<LinearLayout android:id="@+id/timelineMoodFlag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:orientation="horizontal">
<ImageView
android:id="@+id/timelineMoodIcon"
android:layout_width="@dimen/timeline_mood_card_emoticon_wh"
android:layout_height="@dimen/timeline_mood_card_emoticon_wh"
android:contentDescription="@null"
android:layout_gravity="center"
android:src="@drawable/mood_good" />
</LinearLayout>
<LinearLayout
android:id="@+id/timelineMoodCardTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_toRightOf="@id/timelineMoodFlag"
android:orientation="horizontal"
android:padding="@dimen/gap_with_screen" >
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/timelineMoodAuthorAvatar"
android:layout_width="@dimen/timeline_mood_author_avatar_wh"
android:layout_height="@dimen/timeline_mood_author_avatar_wh"
fresco:roundAsCircle="true"/>
<TextView
android:id="@+id/timelineMoodAuthorName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" />
<TextView
android:id="@+id/timelineMoodPostTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" />
</LinearLayout>
</RelativeLayout>
Here is my ListView adapter getView method snippet:
.line 64 @Override .line 65 public View getView(int position, View convertView, ViewGroup parent) { .line 66 MoodTimelineItemHolder holder = null; .line 67 if (convertView == null) { .line 68 convertView = inflater.inflate(R.layout.lstv_mood_timeline_item, null); .line 69 holder = new MoodTimelineItemHolder();
Here is my Application snippet:
public class MoodBoxApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Fresco.initialize(this);
}
}
Here is lib: bolts-tasks-1.4.0.jar drawee-v0.13.0.jar fbcore-v0.13.0.jar fresco-v0.13.0.jar imagepipeline-base-v0.13.0.jar imagepipeline-v0.13.0.jar
environment: android-21 java 7
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@minaee Your root cause appears to be the following, which is unrelated to Fresco.
@kirwan
this is my adapter class i cant implement
setOnItemClickListener
what do you suggest ?