Android - 前缀“xmlns"不能明确绑定到任何命名空间;“xmlns"的命名空间也不能.明确绑定到任何前缀 [英] Android - The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly
问题描述
有没有人遇到这个xmlns"命名空间问题(见下文)?我无法再构建我的工作项目.
Is anyone getting this "xmlns" namespace issue (see below)? I cannot build my work project anymore.
- 一开始我以为是我的 git 分支,所以我切换到 origin develop 和 master 分支 - 问题仍然存在.
- 我清理并重建了我的项目 - 问题仍然存在.
- 我清理并同步了我的成绩文件 - 问题仍然存在.
最后,我尝试重新安装 Android Studio 并重新创建我的 git 存储库 - 问题仍然存在.
- At first I thought it was my git branch, so I switched to the origin develop and master branches - issue persists.
- I cleaned and rebuilt my project - issue persists.
- I cleaned and synched my grade files - issue persists.
Finally I tried re-installing Android Studio and re-creating my git repository - issue persists.
The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly.
Error: The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly.
:{project}:mergeReleaseResources FAILED
Execution failed for task ':{project}:mergeReleaseResources'.
> {project}/build/intermediates/incremental/mergeResources/release/merger.xml:1:61: Error: The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly.
注意:问题似乎类似于 Android Gradle 合并 Values.xml 使用错误的命名空间,但我找不到未使用的命名空间.我运行了检查,但没有发现未使用的命名空间.
Note: Issue seems similar to Android Gradle merged Values.xml uses wrong namespace, but I couldn't find an unused namespace. I ran an inspect, but no unused namespaces were found.
推荐答案
就我而言,删除 com_crashlytics_export_strings.xml 文件修复了此错误.
In my case deleting the com_crashlytics_export_strings.xml file fixed this error.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources>
<!--
This file is automatically generated by Crashlytics to uniquely
identify individual builds of your Android application.
Do NOT modify, delete, or commit to source control!
-->
<string xmlns:ns0="http://schemas.android.com/tools" name="com.crashlytics.android.build_id" ns0:ignore="UnusedResources,TypographyDashes" translatable="false">xxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</string>
</resources>
这篇关于Android - 前缀“xmlns"不能明确绑定到任何命名空间;“xmlns"的命名空间也不能.明确绑定到任何前缀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!