Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用外部库:未找到属性的资源标识符_Android_Xml_Resources_External - Fatal编程技术网

Android 使用外部库:未找到属性的资源标识符

Android 使用外部库:未找到属性的资源标识符,android,xml,resources,external,Android,Xml,Resources,External,我正在我的应用程序中使用 当我将BetterSpinner的xml添加到我的应用程序时,我遇到以下问题: 命名空间“app”未绑定 我找到了一个解决方案,并在我的xml布局中添加了以下内容: xmlns:app="http://schemas.android.com/apk/res-auto" 现在不再有解析问题了。 但当我尝试运行该应用程序时,会出现编译错误: Error:(32) No resource identifier found for attribute 'met_floatin

我正在我的应用程序中使用

当我将BetterSpinner的xml添加到我的应用程序时,我遇到以下问题:

命名空间“app”未绑定

我找到了一个解决方案,并在我的xml布局中添加了以下内容:

xmlns:app="http://schemas.android.com/apk/res-auto"
现在不再有解析问题了。 但当我尝试运行该应用程序时,会出现编译错误:

Error:(32) No resource identifier found for attribute 'met_floatingLabel' in package 'com.example.jublikon'
我添加了如下依赖项:

  compile ('com.weiwangcn.betterspinner:library-material:1.1.0') {
        exclude group: 'com.android.support', module: 'appcompat-v7'
        exclude group: 'com.rengwuxian.materialedittext', module: 'library'
    }
为什么Android Studio找不到gradle完全包含的库的资源

我的完整xml文件:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="10"
    android:background="@color/colorPrimary"
    android:id="@+id/main">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_gravity="center"
        android:gravity="center"
        android:paddingLeft="32dp"
        android:layout_weight="3"
        android:textStyle="bold"
        android:textColor="@android:color/white"
        android:paddingRight="32dp"
        android:textSize="28sp"
        android:text="TITLE"
        android:id="@+id/title"/>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:orientation="vertical"
        android:gravity="center"
        android:layout_weight="5">

        <com.weiwangcn.betterspinner.library.material.MaterialBetterSpinner
            android:id="@+id/spinner2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="MaterialBetterSpinner"
            app:met_floatingLabel="normal" />

    </LinearLayout>
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="3"
        android:layout_gravity="center"
        android:gravity="center"
        android:textColor="@android:color/white"
        android:paddingLeft="64dp"
        android:paddingRight="64dp"
        android:textSize="16sp"
        android:text="description"
        android:id="@+id/description" />
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="64dp" />
</LinearLayout>

根据BetterSpinner Github页面第23期:

您的依赖项中需要有
MaterialEditText
依赖项

你们有并没有像上面那个家伙那个样排除它