minSDKVersion 的清单合并失败
Manifest Merger failed for minSDKVersion
使用以下 gradle 脚本,我想知道如何将 minSdkVersion 从 7 更改为 3(这样我的应用程序就可以 运行 在更多设备上使用)而不在底部出现错误这个 post:
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'
}
...然后我会得到以下错误:
错误:任务“:app: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.0.1\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage
... 也就是说,如果我想使用 Google Play 发布我的应用程序,是否可以将我的最低 SDK 降低到 3(版本 1.5,Cupcake)?另外,如果你想知道,我还在 SDK 管理器中下载了 Android 支持库,如下所示,但它仍然不起作用:
谢谢!
该错误告诉您,您的一个库(在本例中为 AppCompat)仅支持 SDK 版本 7。由于该库不支持任何低于 7 的版本,而您使用该库,因此您无法支持任何低于 7 的值。
您的选择是:
- 删除 AppCompat
- 至少支持 API 级别 7。请注意,SDK version 8 currently has less than 0.1% 的全球市场份额,所有低于 8 的版本合计占 1%。这可能不值得你花时间。
That said, is it even possible to lower my minimum SDK to 3 (version 1.5, Cupcake) if I wanted to publish my app with Google Play?
当然可以。如果您确实愿意,可以上传支持 API 级别 1 的 Android 应用程序。
And also, in case you're wondering, I also downloaded the Android Support Library in the SDK manager as follows, and yet it still doesn't work:
支持库 v4 仅支持回到 API 级别 4,所以我不确定这对支持 API 级别 3 有何帮助。
使用以下 gradle 脚本,我想知道如何将 minSdkVersion 从 7 更改为 3(这样我的应用程序就可以 运行 在更多设备上使用)而不在底部出现错误这个 post:
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'
}
...然后我会得到以下错误:
错误:任务“:app: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.0.1\AndroidManifest.xml Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage
... 也就是说,如果我想使用 Google Play 发布我的应用程序,是否可以将我的最低 SDK 降低到 3(版本 1.5,Cupcake)?另外,如果你想知道,我还在 SDK 管理器中下载了 Android 支持库,如下所示,但它仍然不起作用:
谢谢!
该错误告诉您,您的一个库(在本例中为 AppCompat)仅支持 SDK 版本 7。由于该库不支持任何低于 7 的版本,而您使用该库,因此您无法支持任何低于 7 的值。
您的选择是:
- 删除 AppCompat
- 至少支持 API 级别 7。请注意,SDK version 8 currently has less than 0.1% 的全球市场份额,所有低于 8 的版本合计占 1%。这可能不值得你花时间。
That said, is it even possible to lower my minimum SDK to 3 (version 1.5, Cupcake) if I wanted to publish my app with Google Play?
当然可以。如果您确实愿意,可以上传支持 API 级别 1 的 Android 应用程序。
And also, in case you're wondering, I also downloaded the Android Support Library in the SDK manager as follows, and yet it still doesn't work:
支持库 v4 仅支持回到 API 级别 4,所以我不确定这对支持 API 级别 3 有何帮助。