title: Incompatible type error on FragmentManager. Trying to launch a fragment on actionbar button click
body: <p>I am trying launch a fragment <code>second_fragment_viewall.java</code> with its layout file  second_Fragment_layout on clicking a button on the action bar.</p>
  
  <p>I am getting this error.  </p>
  
  <blockquote>
    <p>Incompatible types</p>
    
    <p>Required: android.app.FragmentManager</p>
    
    <p>Found: android.support.v4.app.FragmentManager</p>
  </blockquote>
  
  <pre><code>public boolean onOptionsItemSelected(MenuItem item) {
      int id = item.getItemId();
  
      if (id == R.id.action_add) {
          {
              new second_fragment_viewall();
              FragmentManager fragmentManagerone=getSupportFragmentManager();
              second_fragment_viewall=new     second_fragment_viewall();
              FragmentTransaction fragmentTransaction=new fagmentManagerone.beginTransaction();
              FragmentTransaction.commit();
          }
      }
      return super.onOptionsItemSelected(item);
  }
  </code></pre>
  
  <p>What changes should i make, please help.</p>