https://stackoverflow.com/questions/11189545/android-android-content-res-resourcesnotfoundexception-string-resource-id-0x
07-31 14:36:18.482 24607-24607/com.example.espl.nivedh E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.espl.nivedh, PID: 24607
android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:328)
at android.content.res.MiuiResources.getText(MiuiResources.java:125)
at android.widget.TextView.setText(TextView.java:4432)
at com.example.espl.nivedh.databinding.ItemCartonViewBindingImpl.executeBindings(ItemCartonViewBindingImpl.java:138)
at androidx.databinding.ViewDataBinding.executeBindingsInternal(ViewDataBinding.java:437)
at androidx.databinding.ViewDataBinding.executePendingBindings(ViewDataBinding.java:409)
at com.example.espl.nivedh.carton_list.CartonAdapter$MyViewHolder.bind(CartonAdapter.kt:80)
at com.example.espl.nivedh.carton_list.CartonAdapter.onBindViewHolder(CartonAdapter.kt:33)
at com.example.espl.nivedh.carton_list.CartonAdapter.onBindViewHolder(CartonAdapter.kt:12)
at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7033)
at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7075)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5991)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6258)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6097)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6093)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
at androidx.recyclerview.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:561)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
at androidx.recyclerview.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4115)
at androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:3521)
at android.view.View.measure(View.java:18830)
at androidx.constraintlayout.widget.ConstraintLayout$Measurer.measure(ConstraintLayout.java:722)
at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.measure(BasicMeasure.java:373)
at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.measureChildren(BasicMeasure.java:112)
at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.solverMeasure(BasicMeasure.java:213)
at androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer.measure(ConstraintWidgetContainer.java:113)
at androidx.constraintlayout.widget.ConstraintLayout.resolveSystem(ConstraintLayout.java:1458)
at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(ConstraintLayout.java:1537)
at android.view.View.measure(View.java:18830)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
at android.view.View.measure(View.java:18830)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
at android.view.View.measure(View.java:18830)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:18830)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
at android.view.Vie
----------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable name="cartonitem1" type="com.example.espl.nivedh.room_database.CartonsOb" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_margin="7dp"
android:padding="8dp"
android:clickable="true"
android:background="@drawable/selection_item_clicked"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--"-->
<!--android:background="@drawable/selection_item"-->
<!--app:setBackground="@{cartonitem1.isSlected}"-->
<!--app:loadBackground="@{item1.isSlected}"-->
<TextView
android:id="@+id/tv_carto_number"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:textSize="18sp"
android:text="@{cartonitem1.cartonDiplayText}"
app:setSelectionForView="@{cartonitem1.isSlected}"
app:layout_constraintEnd_toStartOf="@+id/tv_no_package"
app:layout_constraintStart_toStartOf="parent" />
<!--android:text="@{cartonitem1.code}"-->
<!--app:setTextColor="@{item1.isSlected}"-->
<!--<TextView-->
<!--android:id="@+id/tv_select_value"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="@{item1.strVal}"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintStart_toEndOf="@+id/tv_select_key" />-->
<TextView
android:id="@+id/tv_no_package"
android:text="@{Integer.toString(cartonitem1.noOfPackages)}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:textSize="18sp"
app:setSelectionForView="@{cartonitem1.isSlected}"
app:layout_constraintEnd_toStartOf="@+id/iv_edit"/>
<ImageView
android:id="@+id/iv_edit"
android:layout_width="24dp"
app:setSelectionForView="@{cartonitem1.isSlected}"
android:layout_height="24dp"
app:layout_constraintEnd_toStartOf="@id/iv_delete"
/>
<ImageView
android:id="@+id/iv_delete"
app:setSelectionForView="@{cartonitem1.isSlected}"
android:layout_width="24dp"
android:layout_height="24dp"
app:layout_constraintEnd_toEndOf="parent"/>
<!--app:imageUrl="@{cartonitem1.code}"-->
<!--android:src="@drawable/ic_true"-->
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
07-31 14:36:18.482 24607-24607/com.example.espl.nivedh E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.espl.nivedh, PID: 24607
android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:328)
at android.content.res.MiuiResources.getText(MiuiResources.java:125)
at android.widget.TextView.setText(TextView.java:4432)
at com.example.espl.nivedh.databinding.ItemCartonViewBindingImpl.executeBindings(ItemCartonViewBindingImpl.java:138)
at androidx.databinding.ViewDataBinding.executeBindingsInternal(ViewDataBinding.java:437)
at androidx.databinding.ViewDataBinding.executePendingBindings(ViewDataBinding.java:409)
at com.example.espl.nivedh.carton_list.CartonAdapter$MyViewHolder.bind(CartonAdapter.kt:80)
at com.example.espl.nivedh.carton_list.CartonAdapter.onBindViewHolder(CartonAdapter.kt:33)
at com.example.espl.nivedh.carton_list.CartonAdapter.onBindViewHolder(CartonAdapter.kt:12)
at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7033)
at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7075)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5991)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6258)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6097)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6093)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
at androidx.recyclerview.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:561)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
at androidx.recyclerview.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4115)
at androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:3521)
at android.view.View.measure(View.java:18830)
at androidx.constraintlayout.widget.ConstraintLayout$Measurer.measure(ConstraintLayout.java:722)
at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.measure(BasicMeasure.java:373)
at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.measureChildren(BasicMeasure.java:112)
at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.solverMeasure(BasicMeasure.java:213)
at androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer.measure(ConstraintWidgetContainer.java:113)
at androidx.constraintlayout.widget.ConstraintLayout.resolveSystem(ConstraintLayout.java:1458)
at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(ConstraintLayout.java:1537)
at android.view.View.measure(View.java:18830)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
at android.view.View.measure(View.java:18830)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
at android.view.View.measure(View.java:18830)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:18830)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
at android.view.Vie
----------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable name="cartonitem1" type="com.example.espl.nivedh.room_database.CartonsOb" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_margin="7dp"
android:padding="8dp"
android:clickable="true"
android:background="@drawable/selection_item_clicked"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--"-->
<!--android:background="@drawable/selection_item"-->
<!--app:setBackground="@{cartonitem1.isSlected}"-->
<!--app:loadBackground="@{item1.isSlected}"-->
<TextView
android:id="@+id/tv_carto_number"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:textSize="18sp"
android:text="@{cartonitem1.cartonDiplayText}"
app:setSelectionForView="@{cartonitem1.isSlected}"
app:layout_constraintEnd_toStartOf="@+id/tv_no_package"
app:layout_constraintStart_toStartOf="parent" />
<!--android:text="@{cartonitem1.code}"-->
<!--app:setTextColor="@{item1.isSlected}"-->
<!--<TextView-->
<!--android:id="@+id/tv_select_value"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="@{item1.strVal}"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintStart_toEndOf="@+id/tv_select_key" />-->
<TextView
android:id="@+id/tv_no_package"
android:text="@{Integer.toString(cartonitem1.noOfPackages)}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:textSize="18sp"
app:setSelectionForView="@{cartonitem1.isSlected}"
app:layout_constraintEnd_toStartOf="@+id/iv_edit"/>
<ImageView
android:id="@+id/iv_edit"
android:layout_width="24dp"
app:setSelectionForView="@{cartonitem1.isSlected}"
android:layout_height="24dp"
app:layout_constraintEnd_toStartOf="@id/iv_delete"
/>
<ImageView
android:id="@+id/iv_delete"
app:setSelectionForView="@{cartonitem1.isSlected}"
android:layout_width="24dp"
android:layout_height="24dp"
app:layout_constraintEnd_toEndOf="parent"/>
<!--app:imageUrl="@{cartonitem1.code}"-->
<!--android:src="@drawable/ic_true"-->
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>