Frage

I am having the following error while exporting after integrating Scoreloop. Before that it was fine.

Proguard returned with error code 1. See console
Note: there were 211 duplicate class definitions.
You should check if you need to specify additional program jars.
Exception in thread "main" java.lang.StackOverflowError
at proguard.obfuscate.ClassObfuscator.visitEnclosingMethodAttribute(ClassObfuscator.java:182)
.........
.............

and probably more 210 number of errors which I didn't give here. I mentioned Scoreloop in proguard-project.txt the following way:

#############
# Scoreloop #
#############
-dontwarn com.scoreloop.client.android.core.paymentprovider.**
-keep class com.scoreloop.client.android.core.paymentprovider.fortumo.FortumoPaymentProviderController {*;}
-keep class com.scoreloop.client.android.core.paymentprovider.fortumo.FortumoPaymentProvider {*;}
-keep class com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController {*;}
-dontwarn com.scoreloop.client.android.core.ui.WebViewDialog
-keep class com.scoreloop.client.android.core.ui.WebViewDialog {*;}
-keep class com.facebook.android.** {*;}

How to resolve these errors?

War es hilfreich?

Lösung 2

Solved the problem by myself. Just thought why don't I call all the scoreloop classes together and see what happens; and it worked. After the line:

-dontwarn com.scoreloop.client.android.core.paymentprovider.**

I've added:

-keep class com.scoreloop.** {*;}

And that solved it.

Andere Tipps

If you succeeded to sign before, it's the same situation that I experienced.

After deleting the proguard folder in the project, I try to sign the apk again.

It succeeded!

use -dontnote instead of dontwarn.

Ref: https://www.guardsquare.com/en/products/proguard/manual/usage

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top