title: Replace a fragment with other fragment is giving error
body: <p>Following is my code it is giving error in replace fragment part it is saying the found argument is android.support.v4.app.fragment where as android.app.fragment is required tell me what is error in my code as i am new to this so cant get the issue done   </p>
  
  <pre><code>package com.example.xainshah.fragmentexample;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  
  
  import android.app.FragmentManager;
  import android.app.FragmentTransaction;
  import android.support.v4.app.Fragment;
  import android.view.View;
  import layout.Fragment1;
  import layout.Fragment2;
  
  public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
      public void ChangeFragment(View view){
  
          Fragment fragment;
          if (view == findViewById(R.id.button)){
              fragment= new Fragment1();
              FragmentManager fm=getFragmentManager();
              FragmentTransaction ft=fm.beginTransaction();
              ft.replace(R.id.fragment_place,fragment); \\ Error is here 2nd argument is not compatible that's what the error says 
          }
  
          if (view == findViewById(R.id.button)){
          fragment= new Fragment2();
              FragmentManager fm=getFragmentManager();
              FragmentTransaction ft=fm.beginTransaction();
              ft.replace(R.id.fragment_place,fragment); \\ Error is here 2nd argument is not compatible that's what the error says 
          }
          }
      }
  </code></pre>