title: can't import com.google.api.client.http.* Cannot resolve symbol 'api'
body: <p>I keep getting the error message "Cannot resolve symbol 'api'."
  I'm working on an application that tracks user location using the Google Places API. I've been trying to get it to work, but my import statements have been giving me trouble. I've looked in different places, and the sources I have found all tell me different things, such as...</p>
  
  <ol>
  <li>Putting "compile 'com.google.android.gms:play-services:9.8.0'" in the build.gradle. This usually results in the project not being able to sync. I researched a little bit on this and it mentions how I have to change SDKs, but that doesn't look too promising.</li>
  <li>Putting "useLibrary 'org.apache.http.legacy'" in the build.gradle. This helped the first import statement work ("import org.apache.http.client.HttpResponseException;"), but not the rest.</li>
  </ol>
  
  <p>I have the following import statements in my code.</p>
  
  <pre><code>import org.apache.http.client.HttpResponseException;
  import com.google.api.client.googleapis.GoogleHeaders;
  import com.google.api.client.http.GenericUrl;
  import com.google.api.client.http.HttpRequest;
  import com.google.api.client.http.HttpRequestFactory;
  import com.google.api.client.http.HttpRequestInitializer;
  import com.google.api.client.http.HttpTransport;
  import com.google.api.client.http.javanet.NetHttpTransport;
  import com.google.api.client.http.json.JsonHttpParser;
  import com.google.api.client.json.jackson.JacksonFactory;
  import com.google.android.gms.common.api.GoogleApiClient;
  import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
  </code></pre>
  
  <p>This is what build.gradle looks like:</p>
  
  <pre><code>android {
      useLibrary 'org.apache.http.legacy'
      compileSdkVersion 25
      buildToolsVersion "25.0.0"
      defaultConfig {
          applicationId "tech.pattullo.teamzero"
          minSdkVersion 15
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      //compile 'com.google.android.gms:play-services:9.8.0'
      //compile 'com.google.android.gms:play-services:7.2.0'
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      compile 'com.android.support:appcompat-v7:25.0.0'
      testCompile 'junit:junit:4.12'
  }
  </code></pre>
  
  <p>I'm not sure yet how many of these I actually need, but I don't know how to go about resolving that error message with the 'api' symbol. Any suggestions?</p>