Error on using proguard with Android Facebook sdk 3.0

前端 未结 4 1504
清酒与你
清酒与你 2020-12-17 14:22

Warning: I removed a lot of \"old text\" to keep the question more clean. Just check the history if needed.

I\'m using proguard to both

相关标签:
4条回答
  • 2020-12-17 15:09

    Try

    -keep class com.facebook.** {
       *;
    }
    

    The reason being, is that when specifying private, public, protected you're still opening up default (package private) access to obfuscation.

    0 讨论(0)
  • 2020-12-17 15:14

    This may work (untested)

    -keep class com.facebook.** { *; }
    
    0 讨论(0)
  • 2020-12-17 15:17

    if you want to proguard Facebook, the config below is working for me

    #modify for Facebook
    -keepattributes Signature
    -keep class com.facebook.model.** { *; }
    
    -keepnames class * implements java.io.Serializable
    -keepclassmembers class * implements java.io.Serializable {
        static final long serialVersionUID;
        private static final java.io.ObjectStreamField[] serialPersistentFields;
        !static !transient <fields>;
        private void writeObject(java.io.ObjectOutputStream);
        private void readObject(java.io.ObjectInputStream);
        java.lang.Object writeReplace();
        java.lang.Object readResolve();
    }
    
    0 讨论(0)
  • 2020-12-17 15:21

    This will solve your problem, i hope:

    And the winner is .....

    -keepattributes Signature
    

    From Proguard Homepage:

    The "Signature" attribute is required to be able to access generic types when compiling in JDK 5.0 and higher.

    0 讨论(0)
提交回复
热议问题