question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error parsing XML: not well-formed (invalid token)

See original GitHub issue

Original issue 776 created by kefir500 on 2015-03-04T10:57:38.000Z:

What steps will reproduce the problem?

What is the expected output? What do you see instead?

warning: string 'pref_map_show_center_cross' has no default translation.
warning: string 'pref_map_show_center_cross_desc' has no default translation.

C:\Apktool\res\layout\abc_action_menu_layout.xml:2: error: Error parsing XML: not well-formed (invalid token)

C:\Apktool\res\layout\abc_action_mode_bar.xml:2: error: Error parsing XML: not well-formed (invalid token)

C:\Apktool\res\layout\abc_activity_chooser_view.xml:2: error: Error parsing XML: not well-formed (invalid token)

— And 5 more similar errors —

C:\Apktool\res\layout\fragment_track_record.xml:24: error: No resource identifier found for attribute 'pw_text' in package 'android'

C:\Apktool\res\layout\fragment_track_record.xml:24: error: No resource identifier found for attribute 'pw_textSize' in package 'android'

C:\Apktool\res\layout\fragment_track_record.xml:24: error: No resource identifier found for attribute 'pw_barColor' in package 'android'

– And >10 similar errors —

C:\Apktool\res\layout\view_color_picker_basic_tab.xml:5: error: Error parsing XML: duplicate attribute

What version of the product are you using? On what operating system?

  • Apktool RC4
  • aapt.exe (from the Apktool GitHub repository)

Please provide any additional information below. Seems that XML tags are corrupt. Tried to fix these XML tags manually - no luck. Also tried different aapt and Apktool releases - still the same. Removing "framework/1.apk" does not help.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
warren-bankcommented, May 17, 2020

though this issue is closed, I recently encountered this behavior with apktool 2.4.1

to summarize, the problem traced back to the fact that the decoded apk contained smali filenames with unicode characters.

as a workaround, I wrote a small nodejs command-line utility to rename all smali unicode filenames, and remap all references elsewhere in the project.

wrote it in a day… might not solve everyone’s woes, but I hope that some may find it useful; worked for me.

2reactions
ddccffvvcommented, May 24, 2016

Would it be possible to work around this by just renaming the classes to unique [a-Z*] names and updating the references (during/after decompilation)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

error: Error parsing XML: not well-formed (invalid token)
It means there is a compilation error in your XML file, something that shouldn't be there: a spelling ...
Read more >
"Error parsing XML: not well-formed (invalid token)" when ...
Open the Control Panel. · Click Change date, time, or number formats. · Click the Administrative tab. · Under the Language for non-Unicode...
Read more >
XML parsing error: 'not well-formed (invalid token) at line 1
Hello, I keep getting this notice; XML parsing error: 'not well-formed (invalid token) at line 1, after closing Photoshop .
Read more >
Error parsing XML: not well-formed (invalid token) - MSDN
i have a new layout and everytime i build or rebuild the project, this error shows up Error parsing XML: not well-formed (invalid...
Read more >
Error parsing XML:not well-formed(invalid token) in android ...
Don't post a screenshot - post the actual XML file via a site like pastebin.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found