Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/181.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 使用MaterialDrawer库生成错误_Android_Android Library - Fatal编程技术网

Android 使用MaterialDrawer库生成错误

Android 使用MaterialDrawer库生成错误,android,android-library,Android,Android Library,我正在尝试此操作,但在安装过程中遇到生成错误。有没有人使用过这个库,并且知道是什么导致了这个问题?我已经在他们的github页面上打开了一个问题,但是由于Stackoverflow有数百万程序员,我想知道你们中是否有人以前使用过这个库,并且知道如何解决这个问题 这只有一个依赖项 compile('com.mikepenz:materialdrawer:4.5.1@aar') { transitive = true } 以下是错误: C:\Dev\AndroidWorkspace\Not

我正在尝试此操作,但在安装过程中遇到生成错误。有没有人使用过这个库,并且知道是什么导致了这个问题?我已经在他们的github页面上打开了一个问题,但是由于Stackoverflow有数百万程序员,我想知道你们中是否有人以前使用过这个库,并且知道如何解决这个问题

这只有一个依赖项

compile('com.mikepenz:materialdrawer:4.5.1@aar') {
    transitive = true
}
以下是错误:

C:\Dev\AndroidWorkspace\NotBoringActionBar-master\App\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.1.1\res\values-ldltr-v21\values-ldltr-v21.xml
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner.Underlined'.
C:\Dev\AndroidWorkspace\NotBoringActionBar-master\App\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.1.1\res\values-ldrtl-v23\values-ldrtl-v23.xml
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner.Underlined'.
C:\Dev\AndroidWorkspace\NotBoringActionBar-master\App\build\intermediates\exploded-aar\com.mikepenz\materialize\0.5.1\res\values-v21\values-v21.xml
Error:(9, 21) No resource found that matches the given name: attr 'android:statusBarColor'.
Error:(8, 21) No resource found that matches the given name: attr 'android:windowDrawsSystemBarBackgrounds'.
更新构建梯度

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 19
    buildToolsVersion '19.1.0'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 19
    }
    buildTypes {
        release {
           // runProguard true
           // proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
        }
    }
    productFlavors {
        defaultFlavor {
            proguardFile 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v4:19.1.0'
    compile('com.mikepenz:materialdrawer:4.5.1@aar') {
        transitive = true
    }


}

MaterialDrawer使用支持库v23.1.1这些库需要使用
CompilesdkVersion23

将您的gradle更新为:

compileSdkVersion 23
buildToolsVersion '23.0.2'
并将使用的支持库更新为

compile 'com.android.support:support-v4:23.1.1'

如果你因为某种原因不能这样做。(您肯定应该始终选择使用最新的支持库)您可以将支持库从
MaterialDrawer
中排除,但我认为这会造成许多奇怪的问题。即使V1.0.0的<代码> MaterialDrawer <代码>使用了支持LIBS v21.x/p>您可能需要考虑官方的谷歌导航视图。