React-Native Android : java.io.IOException Could not parse XML from


        Hi everyone, i've curious some compile log event when using React-Native for Android, from searching this kind of stuff happen only for Android. I'm try to update like any suggestion from developer forum but it's doesn't work, so...

        I'm try changing 2 hours and everything goes well, i can see compile log event no errors, so good. Here the sample errors as i founded on my project.


You can check and update one by one error after compile but if you don't want to compile a hundred times, i recommended to take a look this file in your Android SDK path.

AndroidSDK/platform-tools/api/api-versions.xml

the caused of issue is '<' and '>' that contain in side of each xml element, when it using as tag for xml it's fine but when using as a content it errors again and again.


        See above image, the first line will leading an error when compile React-Native for Android, the second line is fixed by change '<' to be '&lt;' and '>' to be '&gt;' the way look like smooth as easy way but not bcoz the below path is the zip file that contain too many files that occurs an errors too.

AndroidSDK/platform-tools/api/annotations.zip

You need to extract above zip file and placing other place then take a look every annotations.xml file inside every folder then fixed by change '<' to be '&lt;' and '>' to be '&gt;' all the place contain this less than and greater than characters.


After fixed all of them, just archive file to be annotations.zip then replace back to AndroidSDK/platform-tools/api/annotations.zip then recompile project with cli again.

        The compile log event should be fine without this 'java.io.IOException Could not parse XML from...' I hope this solution should be clear and nothing special to do but don't forget to back up the file that you're already fixed bcoz i've seen someone told this kind coming with update Android SDK then it might be replace with the error contain again when you update new Android SDK.

Thank you so much for visit this blog. See U next thread.

No Like, No Thumbs Up, No Bell, Just support me by click ads, thank you... 

Comments

Post a Comment