I'm testing Volley's HurlStack in Android M Developer Preview.
After I change compileSdkVersion
from 22
to 'android-MNC'
, all classes from org.apache.http are not compiled:
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.ProtocolVersion;
import org.apache.http.StatusLine;
import org.apache.http.entity.BasicHttpEntity;
import org.apache.http.message.BasicHeader;
import org.apache.http.message.BasicHttpResponse;
import org.apache.http.message.BasicStatusLine;
How can I modify my code to solve this problem?
I know there're some changes related to Apache HTTP client, but it still doesn't work when I follow the steps to add useLibrary 'org.apache.http.legacy'
in gradle.
Reference: HurlStack.java AOSP