Error parsing XML: not well-formed (invalid token)
See original GitHub issueOriginal issue 776 created by kefir500 on 2015-03-04T10:57:38.000Z:
What steps will reproduce the problem?
- Download and recompile this APK: https://www.dropbox.com/s/916e1t25k6notia/locus.apk?dl=1
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:
- Created 9 years ago
- Comments:18 (9 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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)?