Error Proguard Unsupported class version number

我怕爱的太早我们不能终老 提交于 2019-11-29 02:58:39

Seems that Proguard doesn't support Java 8 actually. You have to use JDK version 7.

EDIT-1

I have recompiled Proguard to support JDK 8 classes, doesn't support Java 8 new features but if your code doesn't use Java 8 new syntax(e.g. Lambda Expression) should works without problems. Tested with some android projects.

To use replace the file proguard.jar in

android-sdk\tools\proguard\ 

with the content of THIS ARCHIVE

EDIT-2

Recently has been released the official Proguard 5 that should address the issue. You can download this from HERE

ProGuard 5.0 (released in August 2014) supports Java 8.

ProGuard has not been updated yet to support Java 8.

An issue has already been raised against ProGuard.

Eric Lafortune (ProGuard developer) noted back in October 2013

I'm very busy at the moment, so realistically I won't be able to complete this in the short term, sorry. I'm keeping an eye on the developments though.

He also said

ProGuard probably works on class files that only use older features if you change or disable ClassUtil#checkVersionNumbers.

There is a successor of pyx4me ProGuard Maven plugin on github with support to ProGuard 5.2, hence Java 8 support:

https://github.com/wvengen/proguard-maven-plugin

http://wvengen.github.io/proguard-maven-plugin/

Cheers, Ekho

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!