In my app i showing google map version2 in a fragment. but i get Null pointer exception at
mMap = ((SupportMapFragment) getFragmentManager().findFragmentById(R.id
Try changing to
mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
You're using getFragmentManager(), but casting it to SupportMapFragment
You also need to extend FragmentActivity: http://developer.android.com/reference/android/support/v4/app/FragmentActivity.html