Android的 - 在preFIX"的xmlns"不能绑定明确任何名称空间;也不能在命名空间"的xmlns"明确地绑定到任何preFIX绑定、明确、也不、能在

2023-09-06 01:43:09 作者:腐到深处自然萌﹌

有没有人得到这个的xmlns的命名空间的问题(见下文)?我不能建立我的工作项目了。

Is anyone getting this "xmlns" namespace issue (see below)? I cannot build my work project anymore.

在开始我还以为是我的Git分支,所以我切换到原点制定和主分支 - 问题仍然存在。 我清理和重建我的项目 - 问题仍然存在。 我清理和同步的我的成绩的文件 - 问题仍然存在。

最后,我试图重新安装的Andr​​oid 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的摇篮合并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>