笔者在使用apktool打包时候出现这个错误,但是笔者的解包是没问题的, ,
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
I: Using Apktool 2.7.0-dirty
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/text/StringEscapeUtils
at brut.androlib.meta.YamlStringEscapeUtils.unescapeString(YamlStringEscapeUtils.java:141)
at brut.androlib.meta.ClassSafeConstructor$ConstructStringEx.construct(ClassSafeConstructor.java:58)
at org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.constructStandardJavaInstance(Constructor.java:452)
at org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.construct(Constructor.java:403)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
at org.yaml.snakeyaml.constructor.SafeConstructor.processDuplicateKeys(SafeConstructor.java:108)
at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:81)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:252)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:207)
at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:358)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:207)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:191)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:477)
at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:470)
at brut.androlib.meta.MetaInfo.load(MetaInfo.java:70)
at brut.an
从这一大串报错中可以得到,我们是缺少了一个关键的文件。
于是我就去apktool官网看了一下,然后按照官网安装了一下apktool,
因为笔者是从linux用命令装的apktool,所以缺少了一个库。
我就试图从liunx上用命令 apt-get --purge remove apktool 将apktool卸载掉了
然后去apktool官网按照演示重新下载的apktool
官网链接如下:https://ibotpeaches.github.io/Apktool/install/
从官网下载的就可以使用了,至于原本的库,我没能力加,所以只能删除了。