title: Cannot resolve symbol List<LatLng> google maps API
body: <p>I am trying to create an application which would calculate everything I need for my route, using google API.</p>
  
  <p>I was following very nice guides here on StackOverflow, but now I encountered problem that nobody seemed to have.</p>
  
  <pre><code>List&lt;LatLng&gt; cannot be resolved as symbol
  </code></pre>
  
  <p><strong>My Snippet:</strong></p>
  
  <pre><code>private List&lt;LatLng&gt; decodePoly(String encoded) {
  
          List&lt;LatLng&gt; poly = new ArrayList&lt;LatLng&gt;();
          int index = 0, len = encoded.length();
          int lat = 0, lng = 0;
  
          while (index &lt; len) {
              int b, shift = 0, result = 0;
              do {
                  b = encoded.charAt(index++) - 63;
                  result |= (b &amp; 0x1f) &lt;&lt; shift;
                  shift += 5;
              } while (b &gt;= 0x20);
              int dlat = ((result &amp; 1) != 0 ? ~(result &gt;&gt; 1) : (result &gt;&gt; 1));
              lat += dlat;
  
              shift = 0;
              result = 0;
              do {
                  b = encoded.charAt(index++) - 63;
                  result |= (b &amp; 0x1f) &lt;&lt; shift;
                  shift += 5;
              } while (b &gt;= 0x20);
              int dlng = ((result &amp; 1) != 0 ? ~(result &gt;&gt; 1) : (result &gt;&gt; 1));
              lng += dlng;
  
              LatLng p = new LatLng((((double) lat / 1E5)),
                      (((double) lng / 1E5)));
              poly.add(p);
          }
  
          return poly;
      }
  
      public void drawPath(String result) {
  
          try {
              //Tranform the string into a json object
              final JSONObject json = new JSONObject(result);
              JSONArray routeArray = json.getJSONArray("routes");
              JSONObject routes = routeArray.getJSONObject(0);
              JSONObject overviewPolylines = routes.getJSONObject("overview_polyline");
              String encodedString = overviewPolylines.getString("points");
              List&lt;LatLng&gt; list = decodePoly(encodedString);
  
              for (int z = 0; z &lt; list.size() - 1; z++) {
                  LatLng src = list.get(z);
                  LatLng dest = list.get(z + 1);
                  Polyline line = mMap.addPolyline(new PolylineOptions()
                          .add(new LatLng(src.latitude, src.longitude), new LatLng(dest.latitude, dest.longitude))
                          .width(2)
                          .color(Color.BLUE).geodesic(true));
              }
  
          } catch (JSONException e) {
  
          }
      }
  </code></pre>
  
  <p>This is the part of the code where I recieve an error. </p>
  
  <p><strong>My Imports:</strong></p>
  
  <pre><code>import android.graphics.Color;
  import android.location.Location;
  import android.location.LocationManager;
  import android.support.v7.app.ActionBarActivity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.Button;
  
  
  import org.json.JSONArray;
  import org.json.JSONException;
  import org.json.JSONObject;
  
  import java.io.InputStream;
  import java.util.ArrayList;
  import java.util.List;
  </code></pre>
  
  <p><strong>My Gradle File:</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 21
      buildToolsVersion "21.1.2"
  
      defaultConfig {
          applicationId "appID"
          minSdkVersion 15
          targetSdkVersion 21
          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:22.0.0'
      compile 'com.google.android.gms:play-services:7.0.0'
  }
  </code></pre>
  
  <p>Can someone please help? I am assuming that the problem is with Google API, because I cannot include it to my project. </p>
  
  <p>I appreciate any kind of help!</p>