Start a new topic

Kinvey and Proguard

Hello,



Where can I find the proguard rules to add for Kinvey ?



I added :



> -dontwarn javax.**



> -dontwarn java.lang.management.**



> -dontwarn com.google.android.gcm.**



> -dontwarn sun.misc.**



> -dontwarn com.google.api.client.json.jackson2.JacksonFactory



> -dontwarn com.kinvey.**



> -keep class javax.** { *; }



> -keep class java.lang.management.** { *; }



> -keep class com.google.android.gcm.** { *; }



> -keep class sun.misc.** { *; }



> -keep class com.google.api.client.json.jackson2.JacksonFactory { *; }



> -keep class com.kinvey.** { *; }



but my app still crashes when proguard is enabled.

Hey, you should be good with `-keep class com.kinvey.** { *; }`



Can you double check the logging level in logcat and see which class not found errors you are getting?
Thank you Edward !



I have verified the logs 10 times : verbose level and no filter.



I've found how to solve it like this :

> -keep class com.a*.** { *; }



> -keep class com.b*.** { *; }



> -keep class com.c*.** { *; }



> ...



And the final keep class which works is :

> -keep class com.myapppackage.** { *; }



I don't know why my app classes have been removed by proguard when I use Kinvey.



To help other users, this is my proguard config :

> -dontwarn javax.**



> -dontwarn java.lang.management.**



> -dontwarn com.google.android.gcm.**



> -dontwarn sun.misc.**



> -dontwarn com.google.api.client.json.jackson2.JacksonFactory



> -dontwarn com.kinvey.**



> -keep class com.fabreax.** { *; } # proguard remove some of my classes !



> -keep class com.kinvey.** { *; }
Login or Signup to post a comment