Search code examples
androidproguardscoreloop

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?


Solution

  • 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.