Proguard obfuscation is breaking simplexml

后端 未结 7 817
耶瑟儿~
耶瑟儿~ 2020-12-14 18:01

I am using simplexml in my android project, and everything works fine until I obfuscate the code. Then, errors start pouring in.

Part of the XML is as follows:

7条回答
  •  太阳男子
    2020-12-14 18:05

    Try adding this to your proguard file:

    -keep public class org.simpleframework.** { *; }
    -keep class org.simpleframework.xml.** { *; }
    -keep class org.simpleframework.xml.core.** { *; }
    -keep class org.simpleframework.xml.util.** { *; }
    
    -keepattributes ElementList, Root
    
    -keepclassmembers class * {
        @org.simpleframework.xml.* *;
    }
    

    This fixed it for me.

提交回复
热议问题