Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 error code 1. See console
[2011-02-03 11:28:27 - VideoCreator] java.io.IOException: Can't read [proguard.ClassPathEntry@49b290] (No such file or directory)
[2011-02-03 11:28:27 - VideoCreator]    at proguard.InputReader.readInput(InputReader.java:230)
[2011-02-03 11:28:27 - VideoCreator]    at proguard.InputReader.readInput(InputReader.java:200)
[2011-02-03 11:28:27 - VideoCreator]    at proguard.InputReader.readInput(InputReader.java:178)
[2011-02-03 11:28:27 - VideoCreator]    at proguard.InputReader.execute(InputReader.java:100)
[2011-02-03 11:28:27 - VideoCreator]    at proguard.ProGuard.readInput(ProGuard.java:195)
[2011-02-03 11:28:27 - VideoCreator]    at proguard.ProGuard.execute(ProGuard.java:78)
[2011-02-03 11:28:27 - VideoCreator]    at proguard.ProGuard.main(ProGuard.java:499)

Could not find anything relevant on the net. Any ideas?

like image 880
Guy Avatar asked Feb 03 '11 09:02

Guy


4 Answers

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.

like image 138
Eric Lafortune Avatar answered Oct 17 '22 18:10

Eric Lafortune


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

like image 38
Dom Avatar answered Oct 17 '22 18:10

Dom


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 .
like image 27
Robert Taylor Avatar answered Oct 17 '22 16:10

Robert Taylor


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 :)

like image 31
Echo Lu Avatar answered Oct 17 '22 17:10

Echo Lu