反编译apk出现Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec错误

$ java -jar  ../resources/apktool.jar d -f apk/xxx-person-6.0\(9\)-25.apk -o aaa-o
I: Using Apktool 2.1.0 on mixin-person-6.0(9)-25.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /Users/zhangjg/Library/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010104e2
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:66)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:62)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:57)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlValue(ResScalarValue.java:58)
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:72)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:510)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:264)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:128)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:106)
at brut.apktool.Main.cmdDecode(Main.java:163)
at brut.apktool.Main.main(Main.java:81)

仔细查看,有这么一行:I: Loading resource table from file: /Users/xxx/Library/apktool/framework/1.apk
删除该文件,再次运行即可解决

你可能感兴趣的:(Android)