反编译apk时出错

时间:2014-02-25 21:06:08

标签: android reverse-engineering decompiling

我正在尝试反编译apk。但我面对这个错误:

Could not find the main class: brut.apktool.Main. Program will exit.
Exception in thread "main" -----------------------------------------------------
---------------------
|Wed 02/26/2014 --  0:25:58.98|
--------------------------------------------------------------------------
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)
java.lang.UnsupportedClassVersionError: brut/apktool/Main : Unsupported major.mi
nor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
1)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: brut.apktool.Main. Program will exit.
Exception in thread "main" Press any key to continue . . .

是否有人知道brut.apktool.Main是什么,我该如何解决?

修改

我安装了jdk 1.7并更改了我的JAV_HOME和PATH值,现在我收到此错误:

    --------------------------------------------------------------------------
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
Press any key to continue . . .

1 个答案:

答案 0 :(得分:0)

尝试使用jdk 1.7,因为你的日志似乎正在使用jdk 1.6,你正在反编译的类有java 7格式