Enabling Proguard fail with Can't process class [org/fmod/FMODAudioDevice.class]

By : FindIt
Source: Stackoverflow.com

I have the classes.jar from Unity3d included in my libs folder of Project in Android Studio. If i enable proguard, i could not build it. minifyEnabled true

my build.grade got dependencies

            dependencies {
            compile 'com.google.android.gms:play-services:+'
            compile files('libs/classes.jar')

proguard-rules file has

            -dontwarn org.fmod.**
            -keep  class com.unity3d.** { *; }
            -keep  class org.fmod.** { *; }
            -keepclassmembers   class com.unity3d.player.** { *; }
            -keepclassmembers   class org.fmod.** { *; }
            -libraryjars !libs/classes.jar(!org/fmod/FMODAudioDevice.class)

check the proguard website to have -libraryjars with !. Did not help as well.

Following is the build error.

Error:Execution failed for task ':Android:proguardRelease'.

java.io.IOException: Can't read [/Users/me/after_android_studio/src/libs/classes.jar(;;;;;;!META-INF/MANIFEST.MF)] (Can't process class [org/fmod/FMODAudioDevice.class] (256))

I did my search for similar issue. But i could not read the following URLs.




By : FindIt


Check that the jar file is not strange or corrupt in some way. I came across your question while dealing with the same error message, but for a different jar file. I just discovered that the jar I was fighting with contained a directory entry named "VCardProvider.class". Since it was actually a directory, ProGuard failed to read the ".class" file. Perhaps ProGuard shouldn't have failed (it isn't a file, after all), but fixing the jar resolved the issue for me.

By : dsh

This video can help you solving your question :)
By: admin