Android Proguard java.io.IOException: Can't read [proguard.ClassPathEntry

后端 未结 5 1989
[愿得一人]
[愿得一人] 2020-12-31 09:21

Hi All When enabing proguard for android, while building the signed jar I get the following dump:

[2011-02-03 11:28:27 - VideoCreator] Proguard returned with         


        
相关标签:
5条回答
  • 2020-12-31 09:45

    In JDK1.8 two of the JAR files are in a different location to where Proguard expects them to be, symlinking them fixes it:

    cd $JAVA_HOME/lib
    sudo ln -s ../jre/lib/rt.jar 
    sudo ln -s ../jre/lib/jsse.jar
    
    0 讨论(0)
  • 2020-12-31 09:46

    Download the latest ProGuard and replace the it's existing lib folder in your base sdk tools folder (ex. c:/android-sdk/tools/proguard) with the new one you've downloaded.

    Like Eric said, it will then tell you what's missing. More than likely you've used the wrong path in -libraryjars command. Try removing

    0 讨论(0)
  • 2020-12-31 09:48

    ProGuard can't find (or read) one of the input jars. If you install ProGuard 4.5.1 instead of 4.4, it will print out the proper file name, so you can find out why it is missing.

    0 讨论(0)
  • 2020-12-31 09:50

    Updating ProGuard did help to track down the problem. In my case it was to do with the JDK configuration on my Mac and the rt.jar and jsse.jar files not being located in the usual place.

    I found the solution here.

    cd $JAVA_HOME/lib
    sudo ln -s ../../Classes/classes.jar rt.jar
    sudo ln -s ../../Classes/jsse.jar .
    
    0 讨论(0)
  • 2020-12-31 09:57

    Check whether you got spaces in the path name of .jar. I just encountered this same problem, upgraded to ProGuard 4.6 and got more information in the error message but the problem persisted. Then I figured maybe it was because of spaces in my path name, I replaced all space characters in the path name to "-", ProGuard worked again like a charm :)

    0 讨论(0)
提交回复
热议问题