Proguard - PersistenceException: Constructor not matched for class

后端 未结 2 1048
难免孤独
难免孤独 2021-01-18 04:51

I am using retrofit2.0 in my app with simpleframework.xml library.

The problem is when I run the app without proguard it works fine however

2条回答
  •  再見小時候
    2021-01-18 05:37

    try adding these below lines in your proguard file. It should solve your problem

    -dontnote retrofit2.Platform
    -keepattributes Signature
    -keepattributes Exceptions
    

    and remove these below lines

    -dontwarn retrofit2.**
    -keep class retrofit2.** { *; }
    

提交回复
热议问题