[Solved] error: cannot find symbol method setContentView(int) [duplicate]


In fragment you inflate the layout not setContentView
the code maybe look like this

        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState) {
            View rootView = inflater.inflate(R.layout.fragment1_layout, container, false);

      // Put your fragment code here

        return rootView;
    }

9

solved error: cannot find symbol method setContentView(int) [duplicate]