title: Cannot Resolve Symbol HttpEntity,HttpResponse
body: <p>I am trying to learn XML parsing using <a href="http://www.androidhive.info/2011/11/android-xml-parsing-tutorial/" rel="nofollow noreferrer">this</a> tutorial but some of the classes are not getting imported. Here is the code:</p>
  
  <pre><code>public String getXmlFromUrl(String url) {
      String xml = null;
  
      try {
          // defaultHttpClient
          DefaultHttpClient client = new DefaultHttpClient();
          HttpResponse resp = client.execute(uri);
  
          HttpResponse httpResponse = httpClient.execute(httpPost);
          HttpEntity httpEntity = httpResponse.getEntity();
          xml = EntityUtils.toString(httpEntity);
  
      } catch (UnsupportedEncodingException e) {
          e.printStackTrace();
      } catch (ClientProtocolException e) {
          e.printStackTrace();
      } catch (IOException e) {
          e.printStackTrace();
      }
      // return XML
      return xml;
  }
  </code></pre>
  
  <p>These classes are not getting imported:</p>
  
  <pre><code>import org.apache.http.HttpEntity;
  import org.apache.http.HttpResponse;
  import org.apache.http.client.ClientProtocolException;
  import org.apache.http.impl.client.DefaultHttpClient;
  </code></pre>
  
  <p>My Gradle properties:</p>
  
  <pre><code>android {
      compileSdkVersion 23
      buildToolsVersion "21.1.2"
  
      defaultConfig {
          applicationId "com.example.rr.rio"
          minSdkVersion 15
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.android.support:appcompat-v7:23.0.0'
  }
  </code></pre>