title: Compilation error in Android Studio When making a simple Google Android Maps API v2 project
body: <p>Recently I migrated to the New <strong>Android Studio IDE</strong> based on IntelliJ</p>
  
  <p>The Guides i followed were:</p>
  
  <ol>
  <li><p><a href="https://developers.google.com/maps/documentation/android/start" rel="nofollow noreferrer">https://developers.google.com/maps/documentation/android/start</a> (<em>for
  basics</em>)</p></li>
  <li><p><a href="https://stackoverflow.com/questions/16596715/how-can-i-create-an-android-application-in-android-studio-that-uses-the-google-m">How can I create an Android application in Android Studio that uses the Google Maps Api v2?</a>
  (<em>for importing the required Google Play services and support
  libraries into android studio</em>)</p></li>
  </ol>
  
  <p>All the libraries were properly detected by Android Studio and i didn't get any 'library not found errors'. The project was shown error free. Then when i tried to compile it i got this error.</p>
  
  <pre><code>Gradle: 
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':AID-AmritaInfoDesk:compileDebug'.
  &gt; Compilation failed; see the compiler error output for details.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  
  Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
  </code></pre>
  
  <p>This was my <strong>explorer.java</strong> file</p>
  
  <pre><code>package com.aid.explorer;
  
  import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.SupportMapFragment;
  import com.google.android.gms.maps.model.LatLng;
  import com.google.android.gms.maps.model.MarkerOptions;
  
  import android.os.Bundle;
  import android.support.v4.app.FragmentActivity;
  
  
  public class explorer extends FragmentActivity {
  
      private GoogleMap mMap;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.explorer);
          setUpMapIfNeeded();
      }
  
      @Override
      protected void onResume() {
          super.onResume();
          setUpMapIfNeeded();
      }
  
  
      private void setUpMapIfNeeded() {
          // Do a null check to confirm that we have not already instantiated the map.
          if (mMap == null) {
              // Try to obtain the map from the SupportMapFragment.
              mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
                      .getMap();
              // Check if we were successful in obtaining the map.
              if (mMap != null) {
                  setUpMap();
              }
          }
      }
  
  
      private void setUpMap() {
          mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title("Marker"));
      }
  }
  </code></pre>
  
  <p>And this was my <strong>explorer.xml</strong> file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/map"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            class="com.google.android.gms.maps.SupportMapFragment"/&gt;
  </code></pre>
  
  <p>I would like to know what went wrong. any help would be <em>greatly</em> appreciated</p>