w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Android studio, XML Inflation error on main activity creation android.view.InflateException

your problem is from these lines of code:

   @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        try {
            mListener = (OnFragmentInteractionListener) activity;
        } catch (ClassCastException e) {
            throw new ClassCastException(activity.toString()
                    + " must implement OnFragmentInteractionListener");
        }
    }

your activity must implement OnFragmentInteractionListener, but you do not implement that in your MyActivity.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.