title: Inconvertible types; cannot cast android.app.fragment
body: <p>I am a newbie to programming in android studio, I am trying to work with Google Maps (setting up destination, routes and more) in a navigation drawer, where I have multiple fragments, and one specifically for Google maps, I was Having trouble to use markers and work on the map with the <code>onMapReady()</code>    method, I was able to find that instead i should use the <code>onActivityCreated()</code> method, but once i started working on it, it started giving me the following error: Inconvertible types, cannot cast <code>android.app.Fragment</code> to <code>com.google.android.gms.maps.SupportMapFragment</code>. in the following line of code: <code>mapFragment = (SupportMapFragment) fm.findFragmentById(R.id.map);</code> as well gives me a second error: Wrong 2nd argument type, Found: <code>com.google.android.gms.maps.SupportMapFragment</code> Required: <code>android.app.Fragment</code> in the following line of code: <code>fm.beginTransaction().replace(R.id.map, mapFragment).commit();</code>. Unfortunately i havent been able to find an answer or solution to this problem and will appreciate your help.</p>
  
  <p>Here is my the complete code for the fragment where the map is located:</p>
  
  <pre><code>package demo.mapas;
  
  import android.app.Fragment;
  import android.os.Bundle;
  import android.support.annotation.Nullable;
  //import android.support.v4.app.FragmentManager;
  import android.app.FragmentManager;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  import com.example.usuario.mapas.R;
  import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.OnMapReadyCallback;
  import com.google.android.gms.maps.SupportMapFragment;
  
  /**
   * Created by USUARIO on 3/12/2016.
   */
  public class opcion1Fragment extends Fragment  {
      private SupportMapFragment mapFragment;
  
  
  
  
      @Nullable
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.fragment_option1, container, false);
  
          return rootView;
  
      }
  
      @Override
  
      public void onActivityCreated(Bundle savedInstanceState){
          super.onActivityCreated(savedInstanceState);
  
          FragmentManager fm = getChildFragmentManager();
          mapFragment = (SupportMapFragment) fm.findFragmentById(R.id.map);
          if(mapFragment == null){
              mapFragment = SupportMapFragment.newInstance();
              fm.beginTransaction().replace(R.id.map, mapFragment).commit();
          } else {
              mapFragment.getMapAsync(new OnMapReadyCallback() {
  
                  @Override
                  public void onMapReady(GoogleMap googleMap) {
                      googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
  
                  }
              });
          }
      }
  
  }
  </code></pre>