Error in 9.16 List and following


The error is in this line:
mCrimeReciclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
if I commented this line appears the old Activity.
The error that I had is:
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ‘void$LayoutManager)’ on a null object reference

I added the libraries yet.


Sorry, I get solved this problem . The problem was that I put in the code
View view= inflater.inflate(R.layout.fragment_crime,container,false);
and it had to be:
View view= inflater.inflate(R.layout.fragment_crime_list,container,false);

Thank You