Error: MapFragment cannot be cast to android.support.v4.app.Fragment

后端 未结 1 1262
余生分开走
余生分开走 2020-11-30 07:31

First, I watched out here: Start FragmentActivity from Activity and now I have the following problem:

MapsActivity:

public class Map         


        
相关标签:
1条回答
  • 2020-11-30 07:41

    as you are extending FragmentActivity which indicates you are using Support library v4 compatible with lower version of android. Replace MapFragment with SupportMapFragment inside your xml file. SupportMapFragment is the one to use with the Android Support package. MapFragment is for the native API Level 11 version of fragments.

    0 讨论(0)
提交回复
热议问题