转:http://www.cnblogs.com/sage-blog/p/4323049.html
最近使用APKtool工具反编译APK老是提示不成功,错误如下:
Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars
c file
at
brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at
brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:491)
at
brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
还以为是APK做了优化升级导致呢,一直没在意。。今天又遇到这个问题,网上找了下,原来是APKTool版本不是最新的导致。。
APKTool官网推荐:http://ibotpeaches.github.io/Apktool/install/
Quick Check
Apktool 2.x (Versions after 1.5.2)
Is Java 1.7 installed?
Does executing java -version on command line / command prompt
return 1.7?
If not, please install Java 7 and make it the default.
Apktool 1.x (Versions prior to 1.5.2)
Is Java 1.6 or higher installed?
Does executing java -version on command line / command prompt
return 1.6 or above?
If not, please install Java 6 or Java 7.