Does Proguard not support Java 8?

When I try to use proguard in my application, it displays 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 returned all the code that uses java 8, and now no code uses java 8, and I still get this error

+4
source share
2 answers

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

+7
source

Try installing the java compiler, src = 1.7 target = 1.7
Proguard is working on processing byte code.
You should avoid all java1.8 functions.

+1

Source: https://habr.com/ru/post/1548184/


All Articles