I am displaying the map like this:
GoogleMap googleMap = ((MapFragment)getFragmentManager().findFragmentById(R.id.map)).getMap();
But, I am getting following error
The method getFragmentManager() is undefined for the type
MapActivity
I am displaying the map like this:
GoogleMap googleMap = ((MapFragment)getFragmentManager().findFragmentById(R.id.map)).getMap();
But, I am getting following error
The method getFragmentManager() is undefined for the type
MapActivity
First of all you need to extends your Activity by FragmentActivity, You can not use MapActivity with new Google map api v2. Second, you need to create map api key proper(i.e. debug key and live key both are different).
Check if your target api is 11 or greater, but also check if libraries you use maybe target api 8. Check this: The method getFragmentManager() is undefined for the type MyActivity