错误:清单合并失败sdk:minSdkVersion

时间:2016-02-29 12:14:34

标签: android android-gradle

我是将android eclips项目导入android工作室,但是在构建项目时我遇到了这个错误:

Error:Execution failed for task :myCHAT:processDebugManifest. Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 17 declared in library [MyCHAT:uIMaterialdialogsLib:unspecified] E:\Android\MyChat-MessangerTemplatePack\MyCHAT\myCHAT\build\intermediates\exploded-aar\MyCHAT\uIMaterialdialogsLib\unspecified\AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.afollestad.materialdialogs" to force usage

AndroidManifest是:

<manifest package="com.afollestad.materialdialogs">

<application />

Gradle代码:

apply plugin: 'com.android.library'
android {
compileSdkVersion 21
buildToolsVersion "23.0.2"

defaultConfig {
    minSdkVersion 17
    targetSdkVersion 17
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
}
dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile 'com.android.support:appcompat-v7:21.0.3'
compile files('libs/classes.jar')
}

1 个答案:

答案 0 :(得分:0)

只需删除或注释行:

compile files('libs/classes.jar')