title: Google Map getMapAsync() NullPointerException
body: <p>After I change getMap() to getMapAsync() and implements OnMapReadyCallback I get the error NullPointerException.</p>
  
  <p>here the logcat</p>
  
  <blockquote>
    <p>Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.setMyLocationEnabled(boolean)' on a null object reference at pym.example.com.fypv2.callme.Callme.onCreate(Callme.java:117)`</p>
  </blockquote>
  
  <p>here the code </p>
  
  <pre><code>SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
          .findFragmentById(R.id.map);
  mapFragment.getMapAsync(this);
  
  // Enabling MyLocation in Google Map
  if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &amp;&amp; ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
      // TODO: Consider calling
      //    ActivityCompat#requestPermissions
      // here to request the missing permissions, and then overriding
      //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
      //                                          int[] grantResults)
      // to handle the case where the user grants the permission. See the documentation
      // for ActivityCompat#requestPermissions for more details.
      return;
  }
  mGoogleMap.setMyLocationEnabled(true);
  </code></pre>
  
  <p>and the OnMapReady</p>
  
  <pre><code>@Override
  public void onMapReady(GoogleMap googleMap) {
      mGoogleMap = googleMap;
  }
  </code></pre>