You need to change this
<uses-sdk
android:minSdkVersion="8"
to
<uses-sdk
android:minSdkVersion="12"
as you should using MapFragment
from api level above 11
It looks like GooleMap
object maps
is null. It is better to check the Availability of google play services before initializing map object.
Look at Check for Google Play Services
http://developer.android.com/training/location/retrieve-current.html
Follow
public final GoogleMap getMap ()
Gets the underlying GoogleMap that is tied to the view wrapped by this fragment.
Returns the GoogleMap. Null if the view of the fragment is not yet ready. This can happen if the fragment lifecyle have not gone through onCreateView(LayoutInflater, ViewGroup, Bundle) yet. This can also happen if Google Play services is not available. If Google Play services becomes available afterwards and the fragment have gone through onCreateView(LayoutInflater, ViewGroup, Bundle), calling this method again will initialize and return the GoogleMap.