Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proguard does not support Java 8?

When i try to use proguard on my application it prints out this error. :

C:\Users\ahmooza\Desktop\proguard4.11\lib>"C:/Program Files/Java/jdk1.8.0/bin/ja
va.exe" -jar proguard @myconfig.pro
Error: Unable to access jarfile proguard

C:\Users\ahmooza\Desktop\proguard4.11\lib>"C:/Program Files/Java/jdk1.8.0/bin/ja
va.exe" -jar proguard.jar @myconfig.pro
ProGuard, version 4.11
Reading program jar [C:\Users\ahmooza\Desktop\proguard4.11\lib\Monitor.jar]
Error: Can't read [C:\Users\ahmooza\Desktop\proguard4.11\lib\Monitor.jar] (Can't
process class [org/Shed/Common/Counter$1.class] (Unsupported class version numb
er [52.0] (maximum 51.0, Java 1.7)))

So i reverted all code that uses java 8 and now no code uses java 8 and i still get this error

like image 710
Shed Avatar asked Jul 12 '14 13:07

Shed


2 Answers

ProGuard version 5.0 supports Java 8. At this time of writing, it is in beta. You can download it from Sourceforge.

like image 98
Eric Lafortune Avatar answered Oct 13 '22 16:10

Eric Lafortune


Try java compiler setting, src=1.7 target = 1.7
Proguard works on processing the byte code.
You have to avoid all java1.8 features.

like image 23
AlexWien Avatar answered Oct 13 '22 18:10

AlexWien