我正在尝试在我的XML中使用
TextInputLayout
,但遇到了以下错误:java.lang.RuntimeException: Unable to start activity ComponentInfo{fr.jechange.moncompte/fr.jechange.moncompte.SignUpActivity}: android.view.InflateException: Binary XML file line #36: Error inflating class android.support.design.widget.TextInputLayout
[...]
Caused by: android.view.InflateException: Binary XML file line #36: Error inflating class android.support.design.widget.TextInputLayout
[...]
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/design/R$styleable;
我已经导入了设计库以及support-v7-appcompat
库。同时使用的是Theme.AppCompat.Light.NoActionBar
主题。
我正在使用的XML中包含类似于以下内容的文本输入布局(Text Input Layout):
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:res="http://schemas.android.com/apk/res-auto"
style="@style/matchParent">
<android.support.design.widget.TextInputLayout
android:id="@+id/input"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:inputType="text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.TextInputLayout>
</RelativeLayout>