1
代碼段這個問題作物起來:命名空間android.support.design未綁定
<android.support.design.widget.TextInputLayout
android:id="@+id/lastName_layout"
android:layout_weight="2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android.support.design:hintTextAppearance="@color/colorAccent">
<EditText
android:id="@+id/lastName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#FFF"
android:backgroundTint="#E0E0E0"
android:hint="Last Name"/>
</android.support.design.widget.TextInputLayout>
錯誤出現在第一個塊的最後一行。命名空間應該如何定義?
這是正確的解決方案。我有一個類似的問題,我想在android.support.v7.widget.Toolbar小部件上使用'android.support.v7.appcompat:titleTextColor'。解決方案是將'xmlns:android.support.v7.appcompat =「http://schemas.android.com/apk/res-auto」'行添加到佈局的根元素。 – gregn3