2012-07-24 88 views
0

我在我的應用程序中使用Spring for Android,並試圖使用Proguard進行混淆/優化/縮小。我在運行時收到以下異常:混淆使用Spring for Android的Android應用程序的問題

產生的原因:org.springframework.web.client.RestClientException:難道 不寫請求:發現請求 類型[com.mycompany.myproduct沒有合適的HttpMessageConverter。 AuthenticateRequest]和內容類型 [應用/ JSON] 在org.springframework.web.client.RestTemplate $ HttpEntityRequestCallback.doWithRequest(RestTemplate.java:610) 在org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java :449) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:414) at org.springframework.web.client.RestTemplate。交換(RestTemplate.java:390)

我猜有一些事情,我需要-keep在我proguard.cfg文件,但我似乎無法找出他們可能是什麼。

回答

1

在我proguard.cfg文件我增加了以下內容,它的伎倆:

-keep class org.springframework.** { *; } 
-keep class org.codehaus.jackson.** { *; }