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

时间: 2024-11-03 02:09:08

exception in thread "main" brut.androlib.AndrdolibException: Counld not decode arse file的相关文章

Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file at brut.androlib.res.decoder.ARSCDecoder.decode

使用ApkIDE反编译出现如下错误: Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56) 解决方法: 1.从 apktool 官网:https://ibotpeaches.github.io/Apktool/下载最新版本的apkt

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01030200

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01030200 反编译时遇到标题中的异常,根据描述,原因是找不到资源文件,最有可能的原因是apk中使用了系统资源. 解决办法如下: 从手机中导出framework-res.apk文件,该文件在/system/framework下面,把这个文件拷到跟apkTool同一个目录下,执行以下语句把资源文件加进来: apktool?

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01030200(转)

反编译时遇到标题中的异常,根据描述,原因是找不到资源文件,最有可能的原因是apk中使用了系统资源. 解决办法如下: 从手机中导出framework-res.apk文件,该文件在/system/framework下面,把这个文件拷到跟apkTool同一个目录下,执行以下语句把资源文件加进来: [java] view plaincopy apktool if framework-res.apk 此时再执行 apktool  d  xxx.apk即可. Exception in thread "mai

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command

错误如下: Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_7329934395291017709.tmp, p, --forced-package-id, 127, --min-sdk-version, 9,

Hbase delete遇到的常见异常: Exception in thread "main" java.lang.UnsupportedOperationException

hbase 执行批量删除时出现错误: Exception in thread "main" java.lang.UnsupportedOperationException at java.util.AbstractList.remove(AbstractList.java:161) at org.apache.hadoop.hbase.client.HTable.delete(HTable.java:852) 这种异常其实很常见,remove操作不支持,为什么会出现不支持的情况呢?检查

Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User

Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User user where user.name=?0 and user.pass=?1] at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180

Exception in thread "main" java.lang.NoSuchMethodError: org.testng.TestNG.configure(Lorg/testng/CommandLineArgs;)V

TestNG运行时报以下错误: Exception in thread "main" java.lang.NoSuchMethodError: org.testng.TestNG.configure(Lorg/testng/CommandLineArgs;)V at org.testng.remote.AbstractRemoteTestNG.configure(AbstractRemoteTestNG.java:77) at org.testng.remote.RemoteTestN

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

MyEclipse运行的时候报错,菜鸟不理解是什么意思,最后找了一些资料才知道是因为缺少commons-logging.jar包 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:66) at c

Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: Demo (wrong name: com/zhangyun/Demo)解决办法

介绍一个Java初学者可能会遇到的问题 首先,创建一个类,如下: 文件名:Demo.java package com.zhangyun; public class Demo { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Hello World!"); } } 然后我找到对应在磁盘的位置,如下: E