I am trying to use the latest Spring for Android 1.0.1 with a simple get:
This results in a crash:Code:RestTemplate restTemplate = new RestTemplate(); restTemplate.setRequestFactory(new CommonsClientHttpRequestFactory()); String url = "http://localhost:8090//rest/all"; Mine m = restTemplate(getForObject(url, Mine.class);
Since it says HttpClient is missing, I downloaded httpcomponents-client-4.2.3 and added the seven jars to my project. I still get the same error.Code:03-06 11:17:07.490: E/AndroidRuntime(544): FATAL EXCEPTION: main 03-06 11:17:07.490: E/AndroidRuntime(544): java.lang.NoClassDefFoundError: org.apache.commons.httpclient.HttpClient 03-06 11:17:07.490: E/AndroidRuntime(544): at org.springframework.http.client.CommonsClientHttpRequestFactory.<init>(CommonsClientHttpRequestFactory.java:63)
How do I get past this HttpClient error?


Reply With Quote