Use a MapView inside a fragment.
An exception is thrown when using a layout with a MapView inside it :
Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.
- Download android-support-v4-googlemaps
- Create a libs directory at the root of your project
- Add android-support-v4-r6-googlemaps.jar to this directory
- Make your activity extends FragmentActivity instead of activity