2

I try to run proguard on an Android project contain classes.jar (library from Unity3d software) in attachement. I have error:

    [2014-03-04 15:28:55 - Test0289_0304] Proguard returned with error code 1. See console
[2014-03-04 15:28:55 - Test0289_0304] Error: Can't read [F:\140303\Test0289_0304\lib\untiy-classes.jar] (Can't process class [com/unity3d/player/UnityPlayer.class] (Unknown verification type [251] in stack map frame))

I add one line in proguard-project.txt:

 -libraryjars lib/untiy-classes.jar

I use proguard 4.11.

Steven
  • 166,672
  • 24
  • 332
  • 435
lonshine
  • 21
  • 4
  • which java version you use (not what is installed , what '-source' param is used during javac compilation). if it's 1.6, some posts on the net says maybe you should try 1.5 and 1.7 and see if problem persists. to do it in ant you can change in your ant.properties the following properties:java.source, java.target. – codeScriber Mar 04 '14 at 08:36
  • @codeScriber:I use 1.6. – lonshine Mar 20 '14 at 01:16

1 Answers1

1

This is an issue with the classes in the Unity library: some of the preverification metadata are corrupt. You should check if there is a more recent version. Otherwise, you could modify ProGuard to accept the corrupt classes, as discussed on its issue tracker.

Note that you should not add -libraryjars or -injars to your configuration. The Android build process (Ant, Eclipse, Gradle) already specifies those options for you.

Eric Lafortune
  • 45,150
  • 8
  • 114
  • 106