parse.com not working after proguard

后端 未结 3 1486
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-14 22:55

I\'m using Parse.com features in my app, everything works great on debugging mode. As soon as I generate a signed apk in release mode, I have a killing wait sometimes up to

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-14 23:18

    Apparently the problem is some ANR in the Parse.com library, precisely when it tries to read its cash to sync previous unsynced data or something like this.

    enter image description here

    this happens due to the optimization, since with

    -dontoptimize
    

    parameter in proguard settings the problem is solved, although this is not a good idea, I think, and there should be a way to stop proguard from optimizing just this library.Although all I could find was this parameters :

    # keep parse classes
    #-dontwarn com.parse.**
    -keep class com.parse.** { *; }
    -keep interface com.parse.** { *; }
    
    #-dontwarn org.apache.**
    -keep class org.apache.** { *; }
    -keep interface org.apache.** { *; }
    
    #-dontwarn com.squareup.**
    -keep class com.squareup.** { *; }
    -keep interface com.squareup.** { *; }
    
    -keep class com.shygunsys.pocketcyber.techicalservices.parse.**
    
    
    
    -keep class com.fasterxml.jackson.databind.ObjectMapper {
        public ;
        protected ;
    }
    -keep class com.fasterxml.jackson.databind.ObjectWriter {
        public ** writeValueAsString(**);
    }
    

    over the internet and SO to prevent Proguard from optimizing parse.com library and known libraries which parse uses, but as I said before no luck without the -dontoptimize Any way, would be glad if I hear back from Parse.com developers, and/or Proguard guys to see whose bug is this

提交回复
热议问题