title: Cannot resolve 'findViewById' method in Fragment RecyclerView
body: <p>I'm new to android studio, I was trying to create RecyclerView on Fragment. I was following a tutorial but I still get message ' Cannot resolve 'findViewById'</p>
  <p>I've tried doing:</p>
  <pre><code>RecyclerView recyclerView = (RecyclerView)getView().findViewById(R.id.recyclerView);
  </code></pre>
  <p>But ended up receiving error:</p>
  <pre><code> Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference
  </code></pre>
  <p>Here is the code:</p>
  <pre><code>package com.example.app;
  
  import android.os.Bundle;
  
  import androidx.fragment.app.Fragment;
  import androidx.recyclerview.widget.RecyclerView;
  
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  
  public class Articles extends Fragment {
  
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          NewsList[] myListData = new NewsList[] {
                  new NewsList(&quot;Article 1&quot;, &quot;Some Author&quot;),
                  new NewsList(&quot;Article2&quot;, &quot;Some Author&quot;),
                  new NewsList(&quot;Article3&quot;, &quot;Some Author&quot;),
  
          };
          RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
          NewsAdapter adapter = new NewsAdapter(myListData);
          recyclerView.setHasFixedSize(true);
          recyclerView.setAdapter(adapter);
  
      }
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
  
          return inflater.inflate(R.layout.fragment_create, container, false);
      }
  
  
  }
  </code></pre>
  <p>How can I resolve this issue?</p>