如果您在项目中使用混淆, 请添加以下代码到混淆配置中:
-dontwarn retrofit2.** -keep class retrofit2.** { *; } -keepattributes Signature -keepattributes Exceptions