In my app i showing google map version2 in a fragment. but i get Null pointer exception at
mMap = ((SupportMapFragment) getFragmentManager().findFragmentById(R.id
May be above answers work but what work for me is this.
{
SupportPlaceAutocompleteFragment supportPlaceAutocompleteFragmentSearch;
FragmentManager fragmentManagerSearch = getChildFragmentManager();
supportPlaceAutocompleteFragmentSearch =
(SupportPlaceAutocompleteFragment)
fragmentManagerSearch.findFragmentById(R.id.place_autocomplete_fragment_search);
}