exception in thread "main" brut.androlib.AndrdolibException: Counld not decode arse file

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

       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 参考网址





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值