title: Required com.google.android.gms.GoogleMap found void
body: <p>I have looked online to find a solution as getMap() method is Deprecated, therefore, I would like to replace it with getMapAsync();. I have searched on google as well as androids official documentations and I am still stuck please help. </p>
  
  <p>I am now getting one error message which says incompatible type 
  Required com.google.android.gms.GoogleMap found void.</p>
  
  <pre><code>public class Maps extends AppCompatActivity implements OnMapReadyCallback {
      private GoogleMap googleMap;
  
      @Override protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.Maps);
  
          googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(
                  R.id.mapFragment)).getMapAsync(this);
  
  
          LatLng latlong = new LatLng(lat, lon);
          googleMap.addMarker(new MarkerOptions().position(latlong).title(name));
          googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latlong, 15));
      }
  
      @Override
      public void onMapReady(GoogleMap googleMap) {
  
      }
  }
  </code></pre>
  
  <p><strong>This method below gives the error and it says incompatible type 
  Required com.google.android.gms.GoogleMap found void.</strong></p>
  
  <pre><code>googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(
                  R.id.mapFragment)).getMapAsync(this);
  </code></pre>