在下面第2行:
当我在我的libs中使用httpclient4.1.jar时,删除了setRedirectStrategy错误并且发生了laxRedirect错误(并且laxRedirect导入也出错) - 下面的错误(1),
当我使用httpclient4.2.3时,删除了laxredirect错误并且发生了setRedirectStrategy错误 - 错误(2)。
我怎么办? (使用4.1或4.2.3,必须完成哪些chages?)DefaultHttpClient httpclient = new DefaultHttpClient();
httpclient.setRedirectStrategy(new LaxRedirectStrategy());
导入是:
import org.apache.http.impl.client.LaxRedirectStrategy;
import org.apache.http.impl.client.DefaultHttpClient;
并且错误是:
1- The method setRedirectStrategy(LaxRedirectStrategy) is undefined for the type DefaultHttpClient
2- LaxRedirectStrategy cannot be resolved to a type