Android Studio-manifest合并失败

时间:2016-10-31 02:50:16

标签: android android-studio-2.2

我收到以下错误消息。

  

错误:任务':app:processDebugManifest'的执行失败。   清单合并失败:uses-sdk:minSdkVersion 1不能小于库中声明的版本4 [com.android.support:multidex:1.0.1] C:\ Users \ Nitesh \ Downloads \ SunCalculator(1)\ SunCalculator \ app \建立\中间体\分解-AAR \ com.android.support \ multidex \ 1.0.1 \的AndroidManifest.xml       建议:使用工具:overrideLibrary =“android.support.multidex”强制使用

我的build.gradle(Project)文件包含

// Top-level build file where you can add configuration options common to all 

sub-projects/modules.
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

的build.gradle(APP)

apply plugin: 'com.android.application'
android {
    compileSdkVersion 21
    buildToolsVersion '23.0.0'

    defaultConfig {
        applicationId "swindroid.suntime"
        multiDexEnabled = true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
}

1 个答案:

答案 0 :(得分:0)

您需要在minSdkVersion中设置targetSdkVersiondefaultConfig

defaultConfig {
    applicationId "swindroid.suntime"
    minSdkVersion 25
    targetSdkVersion 25
    multiDexEnabled = true
}