我在Gradle构建脚本中将minSdkVersion设置为8.并且minSdkVersion在
Android模块清单中为4.
哪一个采取?为什么这两个不相互同步?
解决方法
当Android中没有gradle支持时,清单就统一了.现在,如果您为项目添加了gradle支持,则只需忽略旧的清单标记,如gradle
builds your app并确定哪个是正确的最低版本.
这个问题的主要原因是identified:
These build values override the existing values in the manifest file.
This is useful if you want to generate multiple APKs for your modules
where each of the apk files has a different application name,minimum
SDK version,or target SDK version. When multiple manifests are
present,manifest settings are merged in priority of buildType and
productFlavor,/main manifest,and the library manifests
换句话说,gradle允许构建变体,并允许您为每个变体指定最小和目标SDK.