I am trying to put a map with a marker in an activity in an Android app. It compiles and builds fine, but when I try to run the activity the app crashes and I get the messag
Your xml is using a MapFragment, not a SupportMapFragment.
Change your xml to use a SupportMapFragment and it should work:
<fragment class="com.google.android.gms.maps.SupportMapFragment"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Also, make sure that you're inflating the correct layout in the call to setContentView()
.