Cannot be cast to android.app.Fragment

前端 未结 4 1508
攒了一身酷
攒了一身酷 2021-02-03 21:22

I\'m just trying to have a look on Fragment and I got some probs with stupid stuff... There is my SkippersActivity.java :

public class SkippersActivity extends A         


        
4条回答
  •  滥情空心
    2021-02-03 21:49

    I ran into the same error while trying to extend ListFragment. My finding is that, to use ListFragment on a project with minSdkVersion < 11, I will have to import android.support.v4.app.ListFragment;. Otherwise, I will have to import android.app.ListFragment;.

    This link clarified my question.

提交回复
热议问题