0
votes

I'm using Spring for Android in my application, and I'm trying to obfuscate/optimize/shrink using Proguard. I'm getting the following exception at runtime:

Caused by: org.springframework.web.client.RestClientException: Could not write request: no suitable HttpMessageConverter found for request type [com.mycompany.myproduct.AuthenticateRequest] and content type [application/json] at org.springframework.web.client.RestTemplate$HttpEntityRequestCallback.doWithRequest(RestTemplate.java:610) at 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.exchange(RestTemplate.java:390)

I'm guessing there's some things I need to -keep in my proguard.cfg file, but I can't seem to figure out what they might be.

1

1 Answers

1
votes

In my proguard.cfg file I added the following, and it did the trick:

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