Error Proguard Unsupported class version number

后端 未结 4 551
名媛妹妹
名媛妹妹 2020-12-16 10:54

I get always this erroe when I try to obfuscate an App with proguard

Error:ProGuard: [MyApp] java.io.IOException: Can\'t read [C:\\Program Files\\Java\\jdk1.         


        
4条回答
  •  旧巷少年郎
    2020-12-16 11:35

    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

提交回复
热议问题