exception in thread "main" brut.androlib.AndrdolibException: Counld not decode arse file
2015-04-25 13:21
656 查看
最近遇到一个很恶心的问题:
1 错误日志:
Exception in thread "main" brut.androlib.AndrolibException: **Could not decode arsc file**
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
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:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
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:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:102)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
2 原本是以为是 apktool.jar 的问题?
后来子啊stackoverflow 上搜了一下,
SO THIS IS MY QUESTION :
"What are the building requirements (on Eclypse) to permit an app to be decompiled by Apktool ?"
I did some tests and couldn't find any rules... For example, i built an empty app (i just created it and exported it the project to an apk file), the building options were :
Minimum : API 14, Android 4.0
Targeting : API 14, Android 4.0
Compile With : API 14, Android 4.0
And i couldn't decompiled the apk... Anyway, i can't decompiled ANY of my apps ! What do i have to change in the building options? I did my tests on Apktool 1.4.3 and 2.0.0 Also, proguard isn't activated. This link says that it could have problem for building versions upper than 21.1.1 but that it was fixed in ApkTool 2.0.0... https://code.google.com/p/android-apktool/issues/detail?id=680
然后我更新了apktool.jar 还是不可以,但是找到了问题,
原来是因为,我使用 adbmanager 更新的是后,更新的最新的版本, 5.1.1 API22原来,Eclispe 编译APK 的时候, 自动调用 build-tools/22.0.1 下面的jar包,可能采用了新的加密的方案,导致Apktool.jar 无法编译,
归根结底,就是Apktool.jar 没有更新的问题。
解决方案:
很简单,就是将22.0.1 删除,因为,android 以后最新的版本,只支持studio, 不再更新ADT 了。所以,建议以后发开的话,使用studio吧。!
参考网址:
stackoverflow 参考网址
1 错误日志:
Exception in thread "main" brut.androlib.AndrolibException: **Could not decode arsc file**
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
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:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
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:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:102)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
2 原本是以为是 apktool.jar 的问题?
后来子啊stackoverflow 上搜了一下,
SO THIS IS MY QUESTION :
"What are the building requirements (on Eclypse) to permit an app to be decompiled by Apktool ?"
I did some tests and couldn't find any rules... For example, i built an empty app (i just created it and exported it the project to an apk file), the building options were :
Minimum : API 14, Android 4.0
Targeting : API 14, Android 4.0
Compile With : API 14, Android 4.0
And i couldn't decompiled the apk... Anyway, i can't decompiled ANY of my apps ! What do i have to change in the building options? I did my tests on Apktool 1.4.3 and 2.0.0 Also, proguard isn't activated. This link says that it could have problem for building versions upper than 21.1.1 but that it was fixed in ApkTool 2.0.0... https://code.google.com/p/android-apktool/issues/detail?id=680
然后我更新了apktool.jar 还是不可以,但是找到了问题,
原来是因为,我使用 adbmanager 更新的是后,更新的最新的版本, 5.1.1 API22原来,Eclispe 编译APK 的时候, 自动调用 build-tools/22.0.1 下面的jar包,可能采用了新的加密的方案,导致Apktool.jar 无法编译,
归根结底,就是Apktool.jar 没有更新的问题。
解决方案:
很简单,就是将22.0.1 删除,因为,android 以后最新的版本,只支持studio, 不再更新ADT 了。所以,建议以后发开的话,使用studio吧。!
参考网址:
stackoverflow 参考网址
相关文章推荐
- exception in thread "main" brut.androlib.AndrdolibException: Counld not decode arse file
- APK Tool的问题:Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
- APK反编译解决Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars c file问题
- apktool反编译:Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
- apk反编译出错:Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars c file
- Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command
- apktools 工具反编译 :Exception in thread “main” brut.androlib.AndrolibException: Could not decode
- 反编译apk出现Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec错误
- Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01030200(转)
- 用apktool反编译的时候出错:Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
- Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01030200
- IO流复制文件Exception in thread "main" java.io.FileNotFoundException: A (拒绝访问。) 异常
- exception in thread main brut.androlib.err.undefinedresobject resource spec : 0x01010462
- Exception in thread "main" java.io.FileNotFoundException
- Android错误:项目导入时,出现Exception in thread "main" java.lang.NoClassDef、Could not write file 。。。.classpath
- Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01030200
- 今天遇到了这样一个问题 Exception in thread "main" org.hibernate.LazyInitializationException: could not initiali
- Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not fetch initial valu
- Exception in thread "main" java.lang.RuntimeException: Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, do
- 使用maven打包jar后 执行jar包问题,Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefi