title: Google Map is not loading Android - Java
body: <p>Here is what I have but my map is not loading and <code>onMapLoaded</code> is not being called</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  
       &lt;com.google.android.gms.maps.MapView android:id="@+id/mapView"
      android:layout_width="fill_parent"
      android:layout_height="80dp"
      android:layout_marginTop="30dp"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And then in my class I have </p>
  
  <pre><code>public class Activity extends Activity implements GoogleMap.OnMapLoadedCallback {
  
  MapView mMap;
  GoogleMap mGooleMap;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_resturant);
  
      mMap = (MapView) findViewById(R.id.mapView);
      mGooleMap = mMap.getMap();
  }
  
  @Override
  public void onMapLoaded() {
  
      Log.i(TAG, "loaaded");
  }
  }
  </code></pre>
  
  <p>But the onMapLoaded is never called why?</p>
  
  <p>Thanks for the help</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>my xml is now this</p>
  
  <pre><code>&lt;fragment
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/map"
          android:name="com.google.android.gms.maps.SupportMapFragment" /&gt;
  </code></pre>
  
  <p>And I also have </p>
  
  <pre><code>public class Activity extends FragmentActivity {
  </code></pre>