title: Why doesn't the MapView of Google Maps appear in my Android Fragment?
body: <p>What I am trying to do is display a Google Maps view when I click on a list item in my NavigationDrawer. The way I have it set up is that whenever I click on a list item, then the current fragment is replaced with a new one.</p>
  
  <p>So, when I click on "Find Stores" list item, my StoreMapFragment replaces the current fragment.</p>
  
  <p>The problem I am having is that the Google logo and zoom-in and zoom-out buttons appear on the bottom of the screen, but the actual map itself will not show.</p>
  
  <p>I have looked at many of the guides for the Google Maps Android API v2 and similar issues &amp; questions asked on StackOverflow. I have also tried doing this using an activity, but I get the same results.</p>
  
  <p>At first, I didn't see any errors in the stack trace. Now this is what it says:</p>
  
  <p>AndroidManifest.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.fv4.app"
      android:versionCode="1"
      android:versionName="1.0"&gt;
  
      &lt;uses-sdk
          android:minSdkVersion="14"
          android:targetSdkVersion="19" /&gt;
  
      &lt;permission
          android:name="com.fv4.app.permission.MAPS_RECEIVE"
          android:protectionLevel="signature" /&gt;
  
      &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
      &lt;uses-permission android:name="com.fv4.app.permission.MAPS_RECEIVE" /&gt;
  
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/Theme.Teatimefinal"&gt;
          &lt;meta-data
              android:name="com.google.android.gms.version"
              android:value="@integer/google_play_services_version" /&gt;
  
          &lt;meta-data
              android:name="com.google.android.maps.v2.API_KEY"
              android:value="AIzaSyAxwMnDDx7pP23x3sB8ZqACsXC3MUDfE7c" /&gt;
  
            &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>StoreMapFragment.java</p>
  
  <pre><code>public class StoreMapFragment extends Fragment implements OnMapReadyCallback {
      MapView mapView;
      GoogleMap googleMap;
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          View view = inflater.inflate(R.layout.fragment_store_map, container, false);
  
          mapView = (MapView) view.findViewById(R.id.store_map_frag);
  
          mapView.onCreate(savedInstanceState);
  
          if (mapView != null) {
              googleMap = mapView.getMap();
  
              googleMap.getUiSettings().setMyLocationButtonEnabled(false);
  
  //            googleMap.setMyLocationEnabled(true);
  
              googleMap.getUiSettings().setZoomControlsEnabled(true);
          }
  
          return view;
  
      }
  
      @Override
      public void onMapReady(GoogleMap googleMap) {
          googleMap.addMarker(new MarkerOptions()
                  .position(new LatLng(0, 0))
                  .title("Marker"));
      }
  
      @Override
      public void onResume() {
          mapView.onResume();
  
          super.onResume();
      }
  
      @Override
      public void onDestroy() {
          super.onDestroy();
  
          mapView.onDestroy();
      }
  
      @Override
      public void onLowMemory() {
          super.onLowMemory();
  
          mapView.onLowMemory();
      }
  
  }
  </code></pre>
  
  <p>Layout XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;com.google.android.gms.maps.MapView
          android:id="@+id/store_map_frag"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And this is what my screen looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/dAJBX.png" alt="MapView"></p>