Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file

I: Using Apktool 2.0.0-Beta9 on com.qianbian.yuyin-4.2.2-101902.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:54)
        at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:604)
        at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
        at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
        at brut.androlib.Androlib.getResTable(Androlib.java:49)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:93)
        at brut.apktool.Main.cmdDecode(Main.java:169)
        at brut.apktool.Main.main(Main.java:85)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
        at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
        at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:43)
        at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:95)
        at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
        ... 7 more

解决方案:

1.登陆http://ibotpeaches.github.io/Apktool/ 下载最新版本的apktool.jar,

目前最新版本为2.x

2.将下载到的apktool_xxx.jar文件改名为apktool.jar,然后替换掉老版本的apktool.jar

3.现在可以正常反编译apk文件了

原文地址:https://www.cnblogs.com/sea-stream/p/12684971.html