2012-07-24 79 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.** { *; } 
相关问题