I've made this very simple app with just a RecyclerView and a dialog that pops up prompting you to enter info you want to save in a SQLite database. It's not really a serious project, but the app for some reason crashes on Lollipop and gives InlfateException: Binary XML file line #N: Error inflating class EditText
when pressing the button that opens the dialog for the user to insert information. I've checked absolutely everywhere for this and I haven't found solution for it. I have had apps not work properly on Lollipop before and I wasn't able to fix it. I have found some other StackOverflow posts about it and they say that it's a gradle problem, but they were really outdated so they were no use to me. App works fine on anything above Lollipop. Tested on both a physical and a virtual device
Edit:
Dialog xml code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000"
android:padding="16dp">
<EditText
android:id="@+id/editWord"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/custom_et"
android:fontFamily="@font/sf_light"
android:hint="Word"
android:inputType="text"
android:padding="10dp"
android:textColorHint="#474747" />
<EditText
android:id="@+id/editWordDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/editWord"
android:layout_marginTop="20dp"
android:background="@drawable/custom_et"
android:fontFamily="@font/sf_light"
android:hint="Word Meaning"
android:inputType="text"
android:padding="10dp"
android:textColorHint="#474747" />
</RelativeLayout>
Main activity XML code:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="#000"
android:padding="10dp">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#232323"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
app:borderWidth="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/ic_add"
app:layout_constraintVertical_bias="1.0" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
Edit 2:
InlfateException: Binary XML file line #9: Error inflating class EditText
for the dialog layout
Edit 3:
the problem was with the custom_et
file and removing it fixed the problem.