使用下面的gradle脚本,我想知道如何将minSdkVersion从7更改为3(这样我的应用程序就可以在更多设备上运行),而不会在此帖子底部发现错误:minSDKVersion的清单合并失败
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "dpark.cellular_automata"
minSdkVersion 3
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
}
...然后我会得到以下错误:
错误:执行失败的任务 ':应用程序:processDebugManifest'。
Manifest merger failed : uses-sdk:minSdkVersion 3 cannot be smaller than version 7 declared in library [com.android.support:appcompat-v7:23.0.1] C:\Users\Dave\AndroidStudioProjects\Cellular_Automata\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\AndroidManifest.xml Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage
...这就是说,它甚至有可能到我的最低SDK降低到3(1.5,蛋糕版)如果我想发表我与谷歌Play应用程式?而且,在你想知道的话,我还下载了Android支持库在SDK管理器如下,但它仍然无法正常工作:
谢谢!
伟大的答案帮助。 * Upvoted * – DaveNOTDavid