I am trying to write an android app with apache's httpclient library, and although this code snippet compiles when it is in a actual Java project, it has the error The method setRedirectStrategy(new DefaultRedirectStrategy(){}) is undefined for the type DefaultHttpClient when I put it into an android app. Does anybody know the reason?
DefaultHttpClient httpclient = new DefaultHttpClient();
httpclient.setRedirectStrategy(new DefaultRedirectStrategy() {