title: No adapter attached; skipping layout error in Fragment
body: <p>Recyclerview in my Fragment is giving me this error but I couldn't figure it out. There are lots of questions about this issue but none of them solved my problem so far.</p>
  
  <p>Here is a piece of code from my fragment:</p>
  
  <pre><code> @Override 
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
  
      View view = inflater.inflate(R.layout.fragment_home, container, false);
      Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
      ((AppCompatActivity)getActivity()).setSupportActionBar(toolbar);
  
      recyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
  
      initCollapsingToolbar();
  
      RecyclerView.LayoutManager mLayoutManager = new GridLayoutManager(getActivity(), 2);
      recyclerView.setLayoutManager(mLayoutManager);
      recyclerView.addItemDecoration(new GridSpacingItemDecoration(2, dpToPx(10), true));
      recyclerView.setItemAnimator(new DefaultItemAnimator());
      recyclerView.setAdapter(adapter);
  
      prepareSectors();
  
      try {
        Glide.with(this).load(R.drawable.cover).into((ImageView) view.findViewById(R.id.backdrop));
      } catch (Exception e) {
        e.printStackTrace();
      }
  
      return view;
    }
  </code></pre>