title: Android Google Maps : Map View initialization
body: <p>I am trying to display a simple map in my Android application, using the <code>MapView</code> class.
  I use the following <code>onCreate</code> method in my activity :</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      try {
          MapsInitializer.initialize(this);
      } catch (GooglePlayServicesNotAvailableException e) {
          Log.e("Address Map", "Could not initialize google play", e);
      }
  
      MapView mapView = new MapView(this);
      CameraUpdate camPos = CameraUpdateFactory.newLatLng(new LatLng(11.562276,104.920292));
      mapView.getMap().moveCamera(camPos);
      setContentView(mapView);
  }
  </code></pre>
  
  <p>I have a <code>NullPointerException</code>, because the method <code>mapView.getMap()</code> returns <code>null</code>.
  Don't understand why, Google play services are apparently present and initialized.</p>