title: How to add marker to MapView
body: <p>Basically i'm using mapview to show the map in my application. Means not using fragment like most map application. But i'm facing a problem to add a marker to the map. Please help me.</p>
  
  <p>this is my coding</p>
  
  <pre><code>private static final int GPS_ERROR_DIALOG_REQUEST = 9001;
  MapView mMapView;
  GoogleMap map;
  Context CTX = this;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      if (servicesOK()) {
          setContentView(R.layout.parents);
          mMapView = (MapView) findViewById(R.id.map);
          mMapView.onCreate(savedInstanceState);
          Toast.makeText(this, "Ready to map!", Toast.LENGTH_SHORT).show();
          map.addMarker(new MarkerOptions()
                  .position(new LatLng( 4.588946, 101.125293))
                  .title("You are here"));
      }
      else
      {
          Toast.makeText(this, "Not ready to map!", Toast.LENGTH_SHORT).show();
      }
  
      Button AddUser = (Button) findViewById(R.id.user_reg);
      Button KidsDelete = (Button) findViewById(R.id.user_del);
  
      AddUser.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              startActivity(new Intent(Parents.this, AddUser.class));
          }
      });
      KidsDelete.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              startActivity(new Intent(Parents.this, KidsDelete.class));
          }
      });
  }
  
  public boolean servicesOK() {
  
      int isAvailable = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(CTX);
  
      if (isAvailable == ConnectionResult.SUCCESS) {
          return true;
      } else if (GoogleApiAvailability.getInstance().isUserResolvableError(isAvailable)) {
          Dialog dialog = GoogleApiAvailability.getInstance().getErrorDialog(this, isAvailable, GPS_ERROR_DIALOG_REQUEST);
          dialog.show();
      } else {
          Toast.makeText(this, "Can't connect to Google Play services", Toast.LENGTH_SHORT).show();
      }
      return false;
  
  }
  
  //For mapView
  @Override
  protected void onDestroy() {
      super.onDestroy();
      mMapView.onDestroy();
  }
  
  @Override
  public void onLowMemory() {
      super.onLowMemory();
      mMapView.onLowMemory();
  }
  
  @Override
  protected void onPause() {
      super.onPause();
      mMapView.onPause();
  }
  
  
  @Override
  protected void onResume() {
      super.onResume();
      mMapView.onResume();
  }
  
  @Override
  protected void onSaveInstanceState(Bundle outstate) {
      super.onSaveInstanceState(outstate);
      mMapView.onSaveInstanceState(outstate);
  }
  </code></pre>
  
  <p>and this is the error</p>
  
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
                    Process: com.example.moon.mykidstracker, PID: 3031
                    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.moon.mykidstracker/com.example.moon.mykidstracker.Parents}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.model.Marker com.google.android.gms.maps.GoogleMap.addMarker(com.google.android.gms.maps.model.MarkerOptions)' on a null object reference
                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
                        at android.app.ActivityThread.-wrap11(ActivityThread.java)
                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
                        at android.os.Handler.dispatchMessage(Handler.java:102)
                        at android.os.Looper.loop(Looper.java:148)
                        at android.app.ActivityThread.main(ActivityThread.java:5417)
                        at java.lang.reflect.Method.invoke(Native Method)
                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.model.Marker com.google.android.gms.maps.GoogleMap.addMarker(com.google.android.gms.maps.model.MarkerOptions)' on a null object reference
                        at com.example.moon.mykidstracker.Parents.onCreate(Parents.java:35)
                        at android.app.Activity.performCreate(Activity.java:6237)
                        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
                        at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
                        at android.os.Handler.dispatchMessage(Handler.java:102) 
                        at android.os.Looper.loop(Looper.java:148) 
                        at android.app.ActivityThread.main(ActivityThread.java:5417) 
                        at java.lang.reflect.Method.invoke(Native Method) 
                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  </code></pre>