Failing android build migration from ant to gradle

I have some difficulties migrating from ant to gradle, recently received the following error:

[Fatal Error] :2:53: The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly.

The problematic line is:

<resources xmlns:ns1="">

Can you give me any guidelines how to resolve this issue?

Best Regards,
Gospodin Bodurov

Looks like this is caused by the use of custom namespace declarations in resource files. You should be able to simply remove the namespace declaration.

Hello Mark,
I have more than 1000 xmls in the project across various modules. My current build is failing during the merge release resources phase and I think this xml is auto-generated. This file has the following path -


And I don’t have values.xml in the module resource directory. Is there a way to track back which of the original resources is failing before the merge?

Best Regards,
Gospodin Bodurov

I’m not aware of anyway to find that out since it looks like only the final generated resource file that is being validated. This is likely due to migrating to a newer version of the Android build tools rather than anything Gradle or Android Gradle plugin related in general. This should only really apply to Android resource files I would think, so if you have other XML resources that aren’t Android specific you can likely ignore them. Might want to search in your Android resources and manifest files for ‘xmlns:’, that might narrow it down.