3
votes

Hello when i inflate a view i got this error "Binary XML file line #28: Binary XML file line #28: Error inflating class " on 28 line i have this:

28<TextView
        android:id="@+id/QuantityProductInDoc"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text=""
        android:layout_weight="1"
        android:textColor="#000"
        android:textSize="17dp"
        style="@style/Widget.AppCompat.EditText"/>

error: ////////////////////////////////////////////////////////////////// 05-18 08:45:13.200 1385-1385/company.aqua.it.salesdev E/AndroidRuntime: FATAL EXCEPTION: main Process: company.aqua.it.salesdev, PID: 1385 android.view.InflateException: Binary XML file line #28: Binary XML file line #28: Error inflating class at android.view.LayoutInflater.inflate(LayoutInflater.java:539) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at company.aqua.it.salesdev.CustomListOfProductInDoc.getView(CustomListOfProductInDoc.java:39) at android.widget.AbsListView.obtainView(AbsListView.java:2346) at android.widget.ListView.makeAndAddView(ListView.java:1876) at android.widget.ListView.fillDown(ListView.java:702) at android.widget.ListView.fillFromTop(ListView.java:763) at android.widget.ListView.layoutChildren(ListView.java:1685) at android.widget.AbsListView.onLayout(AbsListView.java:2148) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586) at android.widget.LinearLayout.onLayout(LinearLayout.java:1495) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1732) at android.widget.LinearLayout.onLayout(LinearLayout.java:1497) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586) at android.widget.LinearLayout.onLayout(LinearLayout.java:1495) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1732) at android.widget.LinearLayout.onLayout(LinearLayout.java:1497) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586) at android.widget.LinearLayout.onLayout(LinearLayout.java:1495) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586) at android.widget.LinearLayout.onLayout(LinearLayout.java:1495) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678) at android.view.View.layout(View.java:16647) at android.view.ViewGroup.layout(ViewGroup.java:5438) at android.view.ViewRootImpl /////////////////////////////////////////////////// I can not understand what the problem is. thanks.

1
share your whole error with questionAskNilesh
What is line number 28?Bhargav Jhaveri
Why you are setting android:layout_width="0dp"? width or height to 0dp then what it's use?Abhishek

1 Answers

2
votes

Just tried and I found your error

the Line style="@style/Widget.AppCompat.EditText" is error.

Delete it and problem solved. Sorry for the wrong ans just nw