执行失败的任务:appprocessDebugManifest。清单合并失败。请查看控制台更多信息 [英] Execution failed for task :appprocessDebugManifest. Manifest merging failed. See console for more info
问题描述
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.0'
}
}
allprojects {
repositories {
mavenCentral()
}
}
apply plugin: 'android'
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
}
}
defaultConfig {
minSdkVersion 8
targetSdkVersion 16
}
}
后,仍然没有运气多研发。我更改版本号,而Android清单中的minSdkVersion和targetSdkVersion如上的build.gradle文件匹配。不知道为什么这不工作?!?
Still no luck after much researching. I change the version number, and the android manifest matches the minSdkVersion and targetSdkVersion as the build.gradle file above. No idea why this doesn't work?!?
推荐答案
在gradle这个构建系统的minSdkVersion
和 targetSdkVersion
在的AndroidManifest.xml
定义的文件将被您在的build.gradle文件中提及什么来代替。
In gradle build system minSdkVersion
and targetSdkVersion
defined in AndroidManifest.xml
file will be replaced by what you have mentioned in build.gradle file.
如果您正在使用多个模块,或在您的项目库,确保所有的build.gradle文件,以及具有相同的一套配置的AndroidManifest.xml文件的minSdkVersion
和 targetSdkVersion
。
If you are using multiple modules or libraries in your project make sure all build.gradle files as well as AndroidManifest.xml files having same set of configuration for minSdkVersion
and targetSdkVersion
.
更新时间:
这可能可能像google_play_services或其他使用不同的库的minSdkVersion
。
It might possible that any library like google_play_services or other is using different minsdkVersion
.
检查摇篮控制台
输出,并在你的的AndroidManifest.xml
文件所需要的变化,以及在建.gradle文件。也照顾您所有的build.gradle和AndroidManifest.xml中的文件应该有相同的的minSdkVersion
。我试着用不同的价值观,最终发现大多数图书馆采用的minSdkVersion 8
。
Check your Gradle Console
output and make the required changes in your AndroidManifest.xml
files as well as in build.gradle files. Also take care that all your build.gradle and AndroidManifest.xml files should have same minsdkVersion
. I tried with different values and finally found that most of the libraries uses minSdkVersion 8
.
也为更好的做法,可以从清单中删除分钟和目标SDK,并让它们在只有最少的混乱的build.gradle文件。
Also for better practice you can remove min and target sdk from Manifest and have them in build.gradle file only for minimal confusion.
这篇关于执行失败的任务:appprocessDebugManifest。清单合并失败。请查看控制台更多信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!