首页 文章

从Retrofit 2.0.0 beta4迁移到2.0.1时坚持使用proguard

提问于
浏览
0

我试图从Retrofit 2.0.0-beta4迁移到2.0.1,但是proguard文本显示了一个错误 . 我添加的文字是:

-dontwarn retrofit2 . -keep class retrofit2 . ** {*; -keepattributes Signature -keepattributes Exceptions -keepclasseswithmembers class * {@ retrofit2.http . *;}(第31行)

当我尝试发布版本时,我得到的错误是proguard文本缺少某些内容,文本如下:

Warning:Exception while processing task java.io.IOException: proguard.ParseException: Expecting java type before ';' in line 31 of file '/Users/abc/Downloads/xyz/app/proguard-rules.pro' :app:transformClassesAndResourcesWithProguardForRelease FAILED

错误:任务':app:transformClassesAndResourcesWithProguardForRelease'的执行失败 . java.io.IOException:proguard.ParseException:在';'之前期望java类型在'/Users/ABC/Downloads/XYZ/app/proguard-rules.pro'文件的第31行

1 回答

相关问题