Category Archives: android-marshmallow

org.apache.http imports stopped working after upating to Android M

I recently updated my app to use the newest Android 6.0 SDK but when I that these imports stopped working.

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;

I've tried to add the HttpCore and HttpClient gradle but then only the top four imports gets resolved.


Do anyone know how I can resolve this? Thanks in advance! :)