2016-01-21 103 views
0

如何解決此錯誤?當我使用proguard生成釋放APK時出現錯誤

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. 
+0

項目是否建立調試配置,無需proguard的? – sfThomas

回答

2

項目添加到您的proguard-rules.pro文件:

-keep class com.squareup.** {*;} 
-dontwarn com.squareup.** 
-keep class com.ocpsoft.** {*;} 
-dontwarn com.ocpsoft.** 
+0

謝謝,它適用於帶有proguard配置的PrettyTime日期庫。我拿了你的最後2行。 – okarakose

相關問題