Error inflating class fragment

后端 未结 30 2803
长发绾君心
长发绾君心 2020-11-22 14:38

I get the Error

Unable to start activity ComponentInfo{de.androidbuch.activiti/de.androidbuch.activiti.task.Activity}: android.view.InflateException: Binar         


        
30条回答
  •  礼貌的吻别
    2020-11-22 14:48

    As hdemirchian said, make sure to use:

    import android.support.v4.app.Fragment;
    

    And also make sure that the Activity that is using the fragment(s) extends FragmentActivity instead of the regular Activity,

    import android.support.v4.app.FragmentActivity;
    

    to get the FragmentActivity class.

提交回复
热议问题