0

Could you help me in using the proguard in AndroidStudio? I have an app on andengine lib. All I did was a change in app.gradle of release { minifyEnabled from false to true; and I changed proguard-rules.pro file.

First, I added:

-keep class org.andengine.**{
    *;
}

and then:

-keepclasseswithmembernames class * {
    native <methods>;
}

But none of this did help. It claimed about android.util.FloatMath native methods.

That's what it shows afterall.

;

Warning:there were 23 unresolved references to library class members. You probably need to update the library versions. (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)

Warning:Exception while processing task java.io.IOException: Please correct
   the above warnings first.
:app:transformClassesAndResourcesWithProguardForRelease FAILED
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> java.io.IOException: Please correct the above warnings first.

So, is there any way to fix it?

Slava Vedenin
  • 58,326
  • 13
  • 40
  • 59
  • Okay. I don't think that it is the best solution but I added -dontwarn org.andengine.** in proguard-rules,pro. And now it compiles. But still some files are not uglyfied by proguard. That's what I will look for now. – Dmitry Dolgopolov Feb 01 '16 at 20:03
  • I solved it. But the problem was in my own code, so I won't tell about it – Dmitry Dolgopolov Feb 01 '16 at 20:45

0 Answers0