3

I have a library project that processes very well through Proguard when exported in Eclipse as part of the ADT tool chain.

But now I would like to manually run Proguard directly on the library jar as outlined in the step #3 in this thread.

So after copying the library jar to the libs/ folder, I ran:

java -jar C:/adt-bundle-windows-x86_64/sdk/tools/proguard/lib/proguard.jar @../bin/proguard.txt  -verbose -injar mylibproj.jar 

And what I get in return is about zillion (more or less) warning messages like this:

Warning: com.unilj.mylib.FancyDialog: can't find referenced class java.lang.String

Why am I receiving this (what am I doing wrong?) and how can I fix it?

Thanks.

Community
  • 1
  • 1
WebViewer
  • 761
  • 7
  • 21

1 Answers1

3

Looking at the command you ran, looks like you are missing the important piece of -libraryjars, e.g.

-libraryjars c:/adt-bundle-windows-x86_64/sdk/platforms/android-17/android.jar 

If you are using additional libraries, you may want to include them as well. To find out which libraries you are using, go back to Eclipse > Project Properties > Java Build Path > Libraries and check Android Dependencies.

Also, don't forget to reference your *.java (most notably R.java) in your bin/classes:

-injars ../bin/classes

For more information, look at the Troubleshooting section of the ProGuard Manual

Regex Rookie
  • 10,432
  • 15
  • 54
  • 88
  • Updated link for "Troubleshooting Section" - http://proguard.sourceforge.net/index.html#manual/troubleshooting.html – tarkeshwar Nov 21 '13 at 19:49