混淆使用Spring for Android的Android应用程序的问题



我在应用程序中使用Spring for Android,并试图使用Proguard模糊/优化/收缩。我在运行时得到以下异常:

由以下原因引起:org.springframework.web.client.RestClientException:可能未写入请求:找不到适用于请求的HttpMessageConverter类型[com.mycompany.myproduct.AuthenticateRequest]和内容类型[application/json]网址:org.springframework.web.client.RestTemplate$HttpEntityRequestCallback.doWithRequest(RestTemplate.java:610)网址:org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:449)网址:org.springframework.web.client.RestTemplate.execute(RestTemplate.java:414)网址:org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:390)

我猜我的proguard.cfg文件中有一些东西需要-keep,但我似乎不知道它们可能是什么。

在我的proguard.cfg文件中,我添加了以下内容,它做到了:

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

相关内容

最新更新