从 Retrofit 2.0.0 beta4 迁移到 2.0.1 时卡在 proguard 中
Stuck with proguard while migrating from Retrofit 2.0.0 beta4 to 2.0.1
我试图从 Retrofit 2.0.0-beta4 迁移到 2.0.1,但混淆文本显示其中有一个错误。
我添加的文本是:
-dontwarn retrofit2.
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclasseswithmembers class * {@retrofit2.http.*;} (line number 31)
我在尝试制作发布版本时遇到的错误是混淆器文本缺少某些内容,文本如下:
警告:处理任务 java.io.IOException 时出现异常:proguard.ParseException:应在“;”之前输入 java在文件 '/Users/abc/Downloads/xyz/app/proguard-rules.pro'
的第 31 行
:app:transformClassesAndResourcesWithProguardForRelease 失败
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. java.io.IOException: proguard.ParseException: Expecting java type before ';' in line 31 of file '/Users/ABC/Downloads/XYZ/app/proguard-rules.pro'
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
我试图从 Retrofit 2.0.0-beta4 迁移到 2.0.1,但混淆文本显示其中有一个错误。 我添加的文本是:
-dontwarn retrofit2.
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclasseswithmembers class * {@retrofit2.http.*;} (line number 31)
我在尝试制作发布版本时遇到的错误是混淆器文本缺少某些内容,文本如下:
警告:处理任务 java.io.IOException 时出现异常:proguard.ParseException:应在“;”之前输入 java在文件 '/Users/abc/Downloads/xyz/app/proguard-rules.pro'
的第 31 行
:app:transformClassesAndResourcesWithProguardForRelease 失败
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. java.io.IOException: proguard.ParseException: Expecting java type before ';' in line 31 of file '/Users/ABC/Downloads/XYZ/app/proguard-rules.pro'
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}