当我使用 proguard 生成发布 APK 时出现错误
When I generated release APK with proguard I am getting errors
如何解决这个错误?
Warning:com.parse.ParseOkHttpClient: can't find referenced class com.squareup.okhttp.Headers
Warning:com.ocpsoft.pretty.time.web.jsf.PrettyTimeConverter: can't find referenced class javax.faces.context.FacesContext
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':project1:transformClassesAndResourcesWithProguardForRelease'.<br>
java.io.IOException: Please correct the above warnings first.
将此添加到项目中的 proguard-rules.pro
文件中:
-keep class com.squareup.** {*;}
-dontwarn com.squareup.**
-keep class com.ocpsoft.** {*;}
-dontwarn com.ocpsoft.**
如何解决这个错误?
Warning:com.parse.ParseOkHttpClient: can't find referenced class com.squareup.okhttp.Headers
Warning:com.ocpsoft.pretty.time.web.jsf.PrettyTimeConverter: can't find referenced class javax.faces.context.FacesContext
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':project1:transformClassesAndResourcesWithProguardForRelease'.<br>
java.io.IOException: Please correct the above warnings first.
将此添加到项目中的 proguard-rules.pro
文件中:
-keep class com.squareup.** {*;}
-dontwarn com.squareup.**
-keep class com.ocpsoft.** {*;}
-dontwarn com.ocpsoft.**