Android SDK error: Trying instantiate a class that is not a fragment

后端 未结 3 1953
日久生厌
日久生厌 2021-02-07 10:14

I am hardly trying to create a simple application with a top menu and a changeable view below (by pressing the buttons in the menu fragment we change the view of the fragment be

3条回答
  •  时光取名叫无心
    2021-02-07 10:31

    You should be using FragmentActivity instead of Activity that is because you are using support Fragments and multiple Fragments in your activity main


    Edit

    You can now use the Appcompat support library and extends AppCompatActivity to support toolbar and fragment for lower api.

提交回复
热议问题