Android studio 名称空间';app&x27;未绑定,在Android Studio中使用Maven的外部库

Android studio 名称空间';app&x27;未绑定,在Android Studio中使用Maven的外部库,android-studio,Android Studio,每当我尝试为外部libs UI元素指定属性时,我都会得到未绑定的命名空间“app” <LinearLayout android:id="@+id/card_database" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true"

每当我尝试为外部libs UI元素指定属性时,我都会得到未绑定的命名空间“app”

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

对于根元素

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

因此,我打开了10个问题,就像你试图解决这个问题一样,但所有的解决方案都不适用于我。我会把这个贴到其他类似的问题上,以防其他人陷入我的困境

对我有用的是: 打开工具>SDK管理器,然后按编辑SDK位置。现在记下位置,使用windows资源管理器打开,将SDK文件夹复制到另一个位置,例如桌面、文档。完成后,返回编辑SDK位置,然后选择粘贴SDK文件夹的新位置,按“下一步”,然后等待。它应该被修复

添加
xmlns:app=”http://schemas.android.com/apk/res-auto“
以如下方式创建根目录:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <item
        android:orderInCategory="1"
        app:showAsAction = "ifRoom"
        />

</menu>


谢谢,这真是个错误。错误地忽略了它这个链接是什么?有参考或文件吗?你能描述一下吗?谢谢。这并不总是有意义的,回答问题时需要更加精确。