转自: http://blog.csdn.net/love_javc_you/article/details/45269463

最近遇到一个很恶心的问题:

1  错误日志:

[java]  view plain copy print ?
  1. Exception in thread "main" brut.androlib.AndrolibException: **Could not decode arsc file**
  2. at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
  3. at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
  4. at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
  5. at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
  6. at brut.androlib.Androlib.getResTable(Androlib.java:50)
  7. at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
  8. at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
  9. at brut.apktool.Main.cmdDecode(Main.java:146)
  10. at brut.apktool.Main.main(Main.java:77)
  11. Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
  12. at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
  13. at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
  14. at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:102)
  15. at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
  16. at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)

2 原本是以为是  apktool.jar   的问题?

后来子啊stackoverflow 上搜了一下,

[java]  view plain copy print ?
  1. SO THIS IS MY QUESTION :
  2. "What are the building requirements (on Eclypse) to permit an app to be decompiled by Apktool ?"
  3. 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 :
  4. Minimum : API 14, Android 4.0
  5. Targeting : API 14, Android 4.0
  6. Compile With : API 14, Android 4.0
  7. 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相关推荐

  1. Exception in thread main java.lang.Error: 无法解析的编译问题: 方法 main 不能声明为 static;只能在静态类型或顶级类型中才能声明静态方法

    Exception in thread "main" java.lang.Error: 无法解析的编译问题: 方法 main 不能声明为 static:只能在静态类型或顶级类型中才 ...

  2. exception in thread main java.lang.noclassdeffounderror wrong name

    不含包层次的HelloWorld.java public class HelloWorld{ public static void main(String[] args) { System.out.p ...

  3. Exception in thread main java.lang.Error: Unresolved compilation problem

    初学java,使用eclipse编译时,可能会遇到如下图所示的编译错误(Exception in thread "main" java.lang.Error: Unresolved ...

  4. list.add时报错:Exception in thread “main“ java.lang.UnsupportedOperationException

    用list.add()时报错: Exception in thread "main" java.lang.UnsupportedOperationExceptionat java. ...

  5. Exception in thread main java.lang.OutOfMemoryError: Java heap space

    在做大批量数据测试的时候,服务端初始化出现问题 测试规模,没个站2万点量测数据,整个数据超过20万,初始化过程中对量测数据初始化,按站分别初始化,但是初始化到总数据量10万的时候就会报内存溢出错误. ...

  6. Exception in thread main java.lang.IncompatibleClassChangeError: net/sf/cglib/core/DebuggingClassW

    问题: 今天在运行程序的时候报如下错误. 1. java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor 2. Exception i ...

  7. 【错误记录】Groovy 运行报错 ( Exception in thread “main“ groovy.lang.MissingMethodException: No signature of )

    一.报错信息 在使用 Groovy 闭包时 , 会报如下错误 : Exception in thread "main" groovy.lang.MissingMethodExcep ...

  8. Eclipse 报 “Exception in thread main java.lang.OutOfMemoryError: Java heap space ”错误的解决办法

    Eclipse 报 "Exception in thread "main" java.lang.OutOfMemoryError: Java heap space &qu ...

  9. Eclipse 报 “Exception in thread main java.lang.OutOfMemoryError: Java heap space ”错误的解决办法...

    Eclipse 报 "Exception in thread "main" java.lang.OutOfMemoryError: Java heap space &qu ...

最新文章

  1. Generics and Linq demo
  2. [Winform]检测exe是否已经运行,并将其置顶
  3. 潜入水下后,水越深,受周围的挤压力越大...
  4. FFmepg 多线程解码历程
  5. 开源不止,前进不息:2018 OpenInfra Days China来了!
  6. 【JAVA基础篇】枚举
  7. CCF 201403-5 任务调度
  8. 电脑注册表怎么清理_笔记本电脑维修|笔记本电脑屏幕怎么清理
  9. 关于css的一切(updating...)
  10. (原創) 如何為Blog加上簡體中文(繁體中文)翻譯? (Web) (CSS) (JavaScript)
  11. clion 32位xp安装 64位软件
  12. package.json 封装 vue模块_Vue管理系统前端~相关工具引入及封装
  13. 工业级串口Modbus数据绘制曲线及上位机监控软件DotTrend
  14. 第1章 数据库系统概论-单元测验-数据库原理及应用
  15. 群晖docker安装Transmission下载器
  16. 谷歌Chrome浏览器离线安装包
  17. H3C交换机常用命令
  18. 挪威议会邮件系统遭遇攻击,电子邮件安全该如何保障?
  19. 分页查询优化方案总结
  20. 方向导数和梯度的辨析

热门文章

  1. truncated record at 132658019
  2. CSS选择器及其优先级排序
  3. Java基础函数与简单算法练习题
  4. python 批量读取电脑文件夹内视频,获取视频分辨率,过滤删除分辨率较小的文件
  5. python分箱代码_python实现二分类的卡方分箱示例
  6. 一个外国的好网站 http://www.ilovejackdaniels.com/
  7. 给亲爱的网友第一百封回信
  8. Vue组件、Vue插件创建与使用
  9. 基于区块链技术的疫情管理系统
  10. 两个数据库进行数据比对(DataTable对比)