Tutorial Apktool.jar: Fix compile error "Found tag xxx where item is expected"

AndnixSH

PMT Elite Modder
Original poster
Staff member
Modding-Team
Jun 27, 2017
4,540
302,700
1,213
Modding World
On latest apktool, it prints out APKTOOL_DUMMY on /res/values/ for obvious reason, causing compile errors. [BUG]Issues repacking res it gives issues with apktool_dummy in integers.xml and dimens.xml · Issue #2462 · iBotPeaches/Apktool

The fastest way to remove all APKTOOL_DUMMY, is to use any text editor that supporting replacing files and regex. Notepad++ for example

This regex match a whole line containing APKTOOL_DUMMY

Code:
^.*(APKTOOL_DUMMY).*$
Replace all though /res/values/ with nothing, removing all APKTOOL_DUMMY lines

1615888937868.png


The game i encounted, had a thousands of APKTOOL_DUMMY in/res/values/.

Before:
Code:
I: Using Apktool 2.5.0
I: Smaling smali folder into classes.dex...
I: Building resources...
W: D:\APK Easy Tool\1-Decompiled APKs\_com,bilibili,gcg2,aligames_1,1,28\res\values\ids.xml:64: error: Found tag id where item is expected
W:
W: D:\APK Easy Tool\1-Decompiled APKs\_com,bilibili,gcg2,aligames_1,1,28\res\values\layouts.xml:3: error: Found tag layout where item is expected
W:
After:
Code:
I: Using Apktool 2.5.0
I: Smaling smali folder into classes.dex...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
 
  • Like
Reactions: zverilius