We have a project that uses different product flavors and product types. When I select a particular flavor, this error is generated:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processSomeFlavorDebugManifest'.
> com.android.manifmerger.ManifestMerger2$MergeFailureException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
Here is what I have tried:
- ran the task with -info, -debug, -scan, not very helpful.
- reviewed the two manifest files to ensure there are no weird characters or spaces in the prolog
- cleaned project
- rebuilt project
- invalidated cache and restart
- deleted AndroidSDK and Android Studio (also AndroidStudio3.5 directories in ~/Library/...)
Weird thing is, this exact branch builds perfectly fine for others. Did anyone encounter this before?