Error inflating class fragment

后端 未结 30 2236
长发绾君心
长发绾君心 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:41

    If your TaskDetailsFragment extending android.app.Fragment, do change in onCreateView().

    Return your view which you want to show in the Fragment or convert your Layout to view by using LayoutInflater and return it.

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View mainview = inflater.inflate(R.layout.main, null);
        return mainview;
    }
    

    Hope this works. :)

提交回复
热议问题