listview - Error android.view.InflateException: in android log cat -


am populating values listview json response.for have created 1 arrayadapter upon run code throwing error shown below.

08-08 19:06:39.939 28394-28394/com.inspirenetz.app.inpartner e/androidruntime: fatal exception: main process: com.inspirenetz.app.inpartner, pid: 28394                                                                            android.view.inflateexception: binary xml file line #19: error inflating class <unknown>                                                                                @ android.view.layoutinflater.createview(layoutinflater.java:620)                                                                                @ com.android.internal.policy.impl.phonelayoutinflater.oncreateview(phonelayoutinflater.java:56)                                                                                @ android.view.layoutinflater.oncreateview(layoutinflater.java:669)                                                                                @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:694)                                                                                @ android.view.layoutinflater.rinflate(layoutinflater.java:755)                                                                                @ android.view.layoutinflater.rinflate(layoutinflater.java:758)                                                                                @ android.view.layoutinflater.inflate(layoutinflater.java:492)                                                                                @ android.view.layoutinflater.inflate(layoutinflater.java:397)                                                                                @ com.inspirenetz.app.inpartner.adapter.redemptionrequestlistviewadapter.getview(redemptionrequestlistviewadapter.java:35)                                                                                @ android.widget.abslistview.obtainview(abslistview.java:2306)                                                                                @ android.widget.listview.measureheightofchildren(listview.java:1263)                                                                                @ android.widget.listview.onmeasure(listview.java:1175)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5156)                                                                                @ android.widget.linearlayout.measurechildbeforelayout(linearlayout.java:1404)                                                                                @ android.widget.linearlayout.measurevertical(linearlayout.java:695)                                                                                @ android.widget.linearlayout.onmeasure(linearlayout.java:588)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.widget.relativelayout.measurechildhorizontal(relativelayout.java:719)                                                                                @ android.widget.relativelayout.onmeasure(relativelayout.java:455)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.widget.relativelayout.measurechildhorizontal(relativelayout.java:719)                                                                                @ android.widget.relativelayout.onmeasure(relativelayout.java:455)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5156)                                                                                @ android.support.design.widget.coordinatorlayout.onmeasurechild(coordinatorlayout.java:610)                                                                                @ android.support.design.widget.coordinatorlayout.onmeasure(coordinatorlayout.java:677)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.support.v4.widget.drawerlayout.onmeasure(drawerlayout.java:940)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5156)                                                                                @ android.widget.framelayout.onmeasure(framelayout.java:310)                                                                                @ android.support.v7.internal.widget.contentframelayout.onmeasure(contentframelayout.java:135)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5156)                                                                                @ android.widget.linearlayout.measurechildbeforelayout(linearlayout.java:1404)                                                                                @ android.widget.linearlayout.measurevertical(linearlayout.java:695)                                                                                @ android.widget.linearlayout.onmeasure(linearlayout.java:588)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5156)                                                                                @ android.widget.framelayout.onmeasure(framelayout.java:310)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5156)                                                                                @ android.widget.linearlayout.measurechildbeforelayout(linearlayout.java:1404)                                                                                @ android.widget.linearlayout.measurevertical(linearlayout.java:695)                                                                                @ android.widget.linearlayout.onmeasure(linearlayout.java:588)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5156)                                                                                @ android.widget.framelayout.onmeasure(framelayout.java:310)                                                                                @ com.android.internal.policy.impl.phonewindow$decorview.onmeasure(phonewindow.java:2294)                                                                                @ android.view.view.measure(view.java:16820)                                                                                @ android.view.viewrootimpl.performmeasure(viewrootimpl.java:1969)                                                                                @ android.view.viewrootimpl.measurehierarchy(viewrootimpl.java:1162)                                                                                @ android.view.viewrootimpl.performtraversals(viewrootimpl.java:1348)                                                                                @ android.view.viewrootimpl.dotraversal(viewrootimpl.java:1049)                                                                                @ android.view.viewrootimpl$traversalrunnable.run(viewrootimpl.java:5899)                                                                             @ android.view.choreographer$callb 

here adapter code

public class redemptionrequestlistviewadapter extends arrayadapter<redemptionrequestresource> {  private final context context; private list<redemptionrequestresource> objects;  public redemptionrequestlistviewadapter(context context, int textviewresourceid, list<redemptionrequestresource> objects) {     super(context, textviewresourceid, objects);     this.context = context;     this.objects = objects; }  @override public view getview(int position, view convertview, viewgroup parent) {      layoutinflater inflater = (layoutinflater) context             .getsystemservice(context.layout_inflater_service);      view rowview = inflater.inflate(r.layout.redemption_request_listview, parent, false);      textview lblredemptiondate =(textview)rowview.findviewbyid(r.id.lblredemptiondate);     textview lbltrackingid =(textview)rowview.findviewbyid(r.id.lbltrackingid);     textview lblloyaltyid =(textview)rowview.findviewbyid(r.id.lblloyaltyid);     textview lblredemptionstatus =(textview)rowview.findviewbyid(r.id.lblredemptionstatus);      redemptionrequestresource redemptionrequestresource = objects.get(position);      lblredemptiondate.settext(redemptionrequestresource.getrdmdate());     lbltrackingid.settext(redemptionrequestresource.getrdmuniquebatchtrackingid());     lblloyaltyid.settext(redemptionrequestresource.getrdmloyaltyid());     lblredemptionstatus.settext(redemptionrequestresource.getrdmstatus());      return rowview; } } 

here xml file

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:orientation="vertical" android:layout_width="match_parent"     android:layout_height="match_parent"     android:paddingright="@dimen/activity_horizontal_margin"     android:paddingleft="@dimen/activity_horizontal_margin"     android:paddingtop="@dimen/activity_vertical_margin"     android:paddingbottom="@dimen/activity_vertical_margin"     android:background="@drawable/customersearch_bg"     tools:context="com.inspirenetz.app.inpartner.redemption.redemptionrequestlistfragment">      <linearlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:orientation="horizontal"         >          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/lblredemptiondate"             android:text="redemption date"             android:textsize="20sp"             style="@style/edittextdarktheme"             />         <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/lbltrackingid"             android:text="tracking id"             android:textsize="20sp"             style="@style/edittextdarktheme"             />      </linearlayout>      <linearlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:orientation="horizontal">          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="loyalty id :"             android:textsize="20sp"             style="@style/edittextdarktheme"             />         <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/lblloyaltyid"             android:text="loyalty id"             android:textsize="20sp"             style="@style/edittextdarktheme"/>      </linearlayout>      <linearlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:orientation="horizontal">          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="status :"             android:textsize="20sp"             style="@style/edittextdarktheme"             />         <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/lblredemptionstatus"             android:text="status"             android:textsize="20sp"             style="@style/edittextdarktheme"/>      </linearlayout> </linearlayout> 

the error denoting in line of array adapter

 view rowview = inflater.inflate(r.layout.redemption_request_listview, parent, false); 

can please me on this.

i don't have enough reputation comment, suspect problem in .axml layout file. can show file?

especially check line number 19, log says error happens.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -