简体   繁体   中英

Crashlytics : Android Studio Gradle Error related to XML

I am Getting this Error While Building App with Crashlytics

Error:(2) Error parsing XML: prefix must not be bound to one of the reserved >namespace names

There is a com_crashlytics_export_strings.xml added by Crashlytics Automatically. Mind you that this file is added to a module project inside my main project . Main project doesn't have the file. I use its Android Studio plugin. It has the following Content.

<?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">0acfc26a-32c4-4a2e-b19b-fullkey</string>
</resources>

While building the following file is Generated. Also look at the xmlns:ns0 turn to xmlns:ns1 in the generated ones

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns1="http://www.w3.org/2000/xmlns/">
<declare-styleable name="CircleImageView"><attr format="dimension" name="border_width"/><attr format="color" name="border_color"/></declare-styleable>
<!-- From: file:/C:/Users/user/AndroidStudioProjects/Project%20Infinite/circleimage/src/main/res/values/strings.xml -->
<eat-comment/>
<string name="app_name">ACTIVITY_ENTRY_NAME</string>
<!-- From: file:/C:/Users/user/AndroidStudioProjects/Project%20Infinite/circleimage/src/main/res/values/com_crashlytics_export_strings.xml -->
<eat-comment/>
<string name="com.crashlytics.android.build_id" ns1:ignore="UnusedResources,TypographyDashes" translatable="false" ns1:ns0="http://schemas.android.com/tools">0acfc26a-32c4-4a2e-fullkey</string>
</resources>

If I delete the file com_crashlytics_export_strings.xml and build It runs Successfully. But that file will appear when I do a clean build and the problem persists.

您的名称空间已损坏,它应该只是xml:ns但您的名称空间是xml:ns0

Mike from Fabric here.

We shipped out an updated version of the plugins that has a fix for this. If you update to the latest version then this will be all set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM