title: java.lang.IllegalArgumentException: No view found for id 0x7f0901d1
body: <p>Hello everyone I am getting this error when trying to load a fragment when clicking a menu item to my application <code>java.lang.IllegalArgumentException: No view found for id 0x7f0901d1 (com.example.testapp:id/signinfragment) for fragment Signin{79bb46d (c6057ec5-e830-4343-a89f-73175f885aa6) id=0x7f0901d1}</code>  I tried to load the fragment  by using the id from the signin fragment I have  created but the error still appears.</p>
  <p><strong>Main Activity.java</strong></p>
  <pre><code>public class MainActivity extends AppCompatActivity implements  NavigationView.OnNavigationItemSelectedListener {
  
   NavigationView navigationView;
  
  @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
            navigationView.setNavigationItemSelectedListener(this);
  
  
  }
  
  
  
  
  @Override
      public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
          switch (menuItem.getItemId()){
              case R.id.nav_login:
                  getSupportFragmentManager().beginTransaction().replace(R.id.signinfragment,new Signin()).commit();
                  break;
          }
          drawerLayout.closeDrawer(GravityCompat.START);
          return true;
      }
  
  }
  </code></pre>
  <p><strong>Signin.java</strong></p>
  <pre><code>public class Signin extends Fragment {
  
  
      private static final String ARG_PARAM1 = &quot;param1&quot;;
      private static final String ARG_PARAM2 = &quot;param2&quot;;
  
  
      private String mParam1;
      private String mParam2;
  
      public Signin() {
          // Required empty public constructor
      }
  
  
  
      public static Signin newInstance(String param1, String param2) {
          Signin fragment = new Signin();
          Bundle args = new Bundle();
          args.putString(ARG_PARAM1, param1);
          args.putString(ARG_PARAM2, param2);
          fragment.setArguments(args);
          return fragment;
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          if (getArguments() != null) {
              mParam1 = getArguments().getString(ARG_PARAM1);
              mParam2 = getArguments().getString(ARG_PARAM2);
          }
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          // Inflate the layout for this fragment
          return inflater.inflate(R.layout.fragment_signin, container, false);
      }
  }
  </code></pre>
  <p><strong>fragment_signin.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:id=&quot;@+id/signinfragment&quot;
      android:layout_height=&quot;match_parent&quot;
  
      &gt;
  
      &lt;LinearLayout
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          android:id=&quot;@+id/Signin&quot;
          android:orientation=&quot;horizontal&quot; /&gt;
  </code></pre>
  <p><strong>activity_main.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;androidx.drawerlayout.widget.DrawerLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:id=&quot;@+id/linlay_0&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:fitsSystemWindows=&quot;true&quot;
      android:background=&quot;@color/app_background&quot;
      tools:openDrawer=&quot;start&quot;&gt;
  
  
      &lt;com.google.android.material.navigation.NavigationView
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;match_parent&quot;
          android:id=&quot;@+id/nav_view&quot;
          app:headerLayout=&quot;@layout/nav_header&quot;
          app:menu=&quot;@menu/drawer_menu&quot;
          android:layout_gravity=&quot;start&quot;/&gt;
  
      &lt;LinearLayout
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          android:orientation=&quot;vertical&quot;
          android:fitsSystemWindows=&quot;true&quot;&gt;
  </code></pre>