命名空间'app'没有绑定,在Android Studio中使用来自Maven的外部库

当我尝试为外部库UI元素指定属性时,我得到命名空间“应用程序”没有绑定。

<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> 

编译“com.balysv:material-ripple:1.0.0”用于build.gradle,我正在运行带有更新的最新版本的Android Studio。

 xmlns:app="http://schemas.android.com/apk/res-auto" 

到你的根元素

只需select错误(通过鼠标触摸错误),然后按。 “ALT + ENTER”将自动解决错误。