android开发里跳过的坑——android studio 错误Error:Execution failed for task ':processDebugManifest'. > Manifest merger failed with multiple errors, see logs

时间:2021-07-08 19:45:23

使用AS在gradle里配置了多个定制版本,发现在编译版本切换时,会出现错误:

Error:Execution failed for task ':processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
Information:Gradle tasks [:app:generatePhoneWulianDebugSources, :app:mockableAndroidJar, :app:preparePhoneWulianDebugUnitTestDependencies, :app:generatePhoneWulianDebugAndroidTestSources, :generateDebugSources, :mockableAndroidJar, :prepareDebugUnitTestDependencies, :generateDebugAndroidTestSources]

该错误的原因是因为打开了项目的AndroidMenifest.xml文件导致的。关闭该文件后,即可编译通过。