Greum
Well-Known Member
I'm trying to add a floating label to one of my EditTexts .
I have added the dependency
implementation 'com.android.support:design:28.0.0'
And then I wrapped the EditText with a TextInputLayout and changed the EditText to TextInputEditText
But when I run that layout the app crashes.
The first few lines of the error log are:
I have added the dependency
implementation 'com.android.support:design:28.0.0'
And then I wrapped the EditText with a TextInputLayout and changed the EditText to TextInputEditText
Code:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/editName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/text_name"
android:inputType="textPersonName" />
</android.support.design.widget.TextInputLayout>
But when I run that layout the app crashes.
The first few lines of the error log are:
Code:
2019-07-25 19:40:45.717 7492-7492/com.domain.agedatabase E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.domain.agedatabase, PID: 7492
android.view.InflateException: Binary XML file line #6: Binary XML file line #6: Error inflating class android.support.design.widget.TextInputLayout
Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class android.support.design.widget.TextInputLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.TextInputLayout" on path: DexPathList[[zip file "/data/app/com.domain.agedatabase-XIahRtMJot7YD30IBJ79pQ==/base.apk", zip file "/data/app/com.domain.agedatabase-XIahRtMJot7YD30IBJ79pQ==/split_lib_dependencies_apk.apk", zip file "/data/app/com.domain.agedatabase-XIahRtMJot7YD30IBJ79pQ==/split_lib_resources_apk.apk", zip file