使用mikepenz / MaterialDrawer库时解决依赖性时出错

时间:2015-09-04 16:44:59

标签: android gradle materialdrawer

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

  

C:\ ASP \示例\应用\构建\中间体\分解-AAR \ com.android.support \程序兼容性-V7 \ 23.0.0 \ RES \值-V23 \值-v23.xml   错误:(2)检索项目的父项时出错:找不到与给定名称匹配的资源' android:TextAppearance.Material.Widget.Button.Inverse'。   错误:(2)检索项目的父项时出错:找不到与给定名称匹配的资源' android:Widget.Material.Button.Colored'。   错误:任务':app:processDebugResources'执行失败。   com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令' C:\ Users \ Aayush Karwatkar \ AppData \ Local \ Android \ sdk1 \ build-工具\ 23.0.0 \ aapt.exe''完成非零退出值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
}

}

1 个答案:

答案 0 :(得分:1)

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

相关问题