android - 使用mikepenz/MaterialDrawer库解决依赖项时出错

标签 android gradle materialdrawer

使用该库时出现以下错误:

C:\ASP\example\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v23\values-v23.xml Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'. Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Aayush Karwatkar\AppData\Local\Android\sdk1\build-tools\23.0.0\aapt.exe'' finished with non-zero exit value 1



Build.Gradle文件是这样的:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "23.0.0"

defaultConfig {
    applicationId "com.aayush.com.example"
    minSdkVersion 14
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.0'

//Core card library
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.1.0'
//Optional for built-in cards
compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.1.0'
//Optional for RecyclerView
compile 'com.github.gabrielemariotti.cards:cardslib-recyclerview:2.1.0'

compile('com.mikepenz:materialdrawer:4.0.5@aar') {
    transitive = true
}

}

最佳答案

您可以通过将compileSdkVersion更改为23来解决此错误。

关于android - 使用mikepenz/MaterialDrawer库解决依赖项时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32402939/

相关文章:

java - 在 LibGDX 中逐像素绘制形状

android - 本地路径不存在 Android Studio 1.0

gradle - 在gradle上加特林:NoClassDefFoundError:scala/Serializable

android - MaterialDrawer:选择突出显示和在项目上单击帐户标题的监听器

android.support.design.widget.NavigationView 膨胀问题(目标 api 23,最小 api 10)

android - 为 materialDatePicker 设置 180 天的日历限制

java - 从 0.2.x 更新到 0.3.1 后的 Android Studio Gradle 错误

android - fragment 中的 MaterialDrawer 后退按钮

android - 如何使用 3rd 方库构建 android studio 项目

android - 在android中操作/处理音频信号?