命名空间“应用程序"未绑定,在带有 Maven 外部库的 Android Studio 中 [英] Namespace 'app' not bound, in Android Studio with external lib from Maven
本文介绍了命名空间“应用程序"未绑定,在带有 Maven 外部库的 Android Studio 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每当我尝试为外部库 UI 元素指定属性时,我都会收到未绑定 Namespace 'app'.
I get Namespace 'app' not bound whenever I try to specify the properties for the external libs UI elements.
<LinearLayout
android:id="@+id/card_database"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:onClick="dbclicked"
android:orientation="horizontal"
android:background="#ffff7f31"
>
<ImageView
android:id="@+id/img_database"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/db"
/>
<TextView
android:id="@+id/txt_database"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:paddingStart="15dp"
android:text="@string/db"
android:textColor="#ffffff"
android:textSize="20sp"
android:autoText="false" />
</LinearLayout>
</com.balysv.materialripple.MaterialRippleLayout>
compile 'com.balysv:material-ripple:1.0.0' 在 build.gradle 中使用,我正在运行带有更新的最新版本的 Android Studio.
compile 'com.balysv:material-ripple:1.0.0' is used in build.gradle and I am running the latest version of the Android Studio with updates.
推荐答案
添加
xmlns:app="http://schemas.android.com/apk/res-auto"
到你的根元素
这篇关于命名空间“应用程序"未绑定,在带有 Maven 外部库的 Android Studio 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文