【发布时间】:2015-11-26 11:15:14
【问题描述】:
我正在尝试这个MaterialDrawer library 但我在安装过程中遇到了构建错误。有没有人使用过这个库并且知道是什么导致了这个问题?我已经在他们的 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
}
}
【问题讨论】:
-
可以考虑官方的Google NavigationView developer.android.com/reference/android/support/design/widget/…android4devs.com/2015/06/…