Proguard Android Parse SDK issue

I have 1.5.1 syntax in my application and everything works fine, but when I go to export to APK I get:

[2014-09-05 19:53:08 - myapp] Proguard returned with error code 1. See console
[2014-09-05 19:53:08 - myapp] Note: there were 662 duplicate class definitions.
[2014-09-05 19:53:08 - myapp] Warning: com.parse.FacebookAuthenticationProvider$1: can't find superclass or interface com.facebook.android.Facebook$ServiceListener
[2014-09-05 19:53:08 - myapp] Warning: com.parse.FacebookAuthenticationProvider$2: can't find superclass or interface com.facebook.Session$StatusCallback
[2014-09-05 19:53:08 - myapp] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find superclass or interface com.facebook.Request$Callback
[2014-09-05 19:53:08 - myapp] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook
......
[2014-09-05 19:53:08 - myapp]   at proguard.Initializer.execute(Initializer.java:321)
[2014-09-05 19:53:08 - myapp]   at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-09-05 19:53:08 - myapp]   at proguard.ProGuard.execute(ProGuard.java:86)
[2014-09-05 19:53:08 - myapp]   at proguard.ProGuard.main(ProGuard.java:492)

      

In my proguard.cfg I have the following:

-keepattributes *Annotation*
-keep class com.parse.* { *; } 
-libraryjars libs/Parse-1.5.1.jar 

      

It drives me crazy!!!

+3


source to share


2 answers


You should also try to keep the com.parse subpackages:

-keepattributes *Annotation*
-keep class com.parse.** { *; }

      



You should not add options -libraryjars

, as the Android build process already automatically detects all the necessary ones -injars

, -outjars

and -libraryjars

for you. This only throws duplicate class warnings.

+5


source


Mine was fixed by adding this:

-keep class com.parse.* { *; }
-dontwarn com.parse.**

      



Link: this post .

+4


source







All Articles