Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proguard error: there were 211 duplicate class definitions

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?

like image 518
Nafis Avatar asked Feb 01 '26 21:02

Nafis


2 Answers

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!

like image 139
Hogun Avatar answered Feb 04 '26 10:02

Hogun


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.

like image 41
Nafis Avatar answered Feb 04 '26 10:02

Nafis