I was working on my project when I have updated the Android Studio to version AI-141.2024585.
Everything worked well before upgrading, but then the project didn't compile. I have this error Error: (3) Error parsing XML: prefix must not be bound to one of the reserved namespace names And this is the file values.xml with error:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns1="http://www.w3.org/2000/xmlns/">
<declare-styleable name="DragSortListView"><attr format="dimension" name="collapsed_height"/><attr format="color" name="float_background_color"/><attr format="float" name="float_alpha"/><attr format="integer" name="remove_animation_duration"/><attr format="integer" name="drop_animation_duration"/><attr format="float" name="slide_shuffle_speed"/><attr format="boolean" name="remove_enabled"/><attr name="remove_mode"><enum name="clickRemove" value="0"/><enum name="flingRemove" value="1"/></attr><attr format="integer" name="fling_handle_id"/><attr format="integer" name="click_remove_id"/><attr format="boolean" name="drag_enabled"/><attr name="drag_start_mode"><enum name="onDown" value="0"/><enum name="onMove" value="1"/><enum name="onLongPress" value="2"/></attr><attr format="integer" name="drag_handle_id"/><attr format="float" name="drag_scroll_start"/><attr format="float" name="max_drag_scroll_speed"/><attr format="boolean" name="track_drag_sort"/><attr format="boolean" name="use_default_controller"/><attr format="boolean" name="sort_enabled"/></declare-styleable>
<eat-comment/>
<string name="com.crashlytics.android.build_id" ns1:ignore="UnusedResources,TypographyDashes" translatable="false" ns1:ns0="http://schemas.android.com/tools">0000000000000000</string>
</resources>
I've tried installing a stable version of Android Studio and updating gradle. I also searched the ns1 attribute in the entire project but only appears in that file.
Being a generated file can not change it, but I can modify the library. Do you know how to fix the error? Thanks a lot
It's because of crashlytics plugin. You may try to delete any crashltics-generated xml files in every modules, Then re-sync the gradle file of your app.
The crashltics-generated xml files looks like [ModuleXYZ]/src/res/values/com_crashlytics_xxx.xml
And Crashlytics seems to release an update you should also update the plugin.
Update After successfully building my project with procedure above it could happen again, it happened twice yesterday. Not sure why but just follow the procedure above it'll be fixed.
I had the same problem and as Robert said the problem can be fixed deleting all the com_crashlytics_export_strings.xml
files.
Also make sure in your build.gradle the crashlytics version is 2.4.0+ and the corrupteds files won't be generated again.
compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {
transitive = true;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With