Why Android Fragment showing incompatible? : <p>I going to add a fragment to an Activity . But its shows following problems . May be it's not compatible .Has there any solution ?</p>

<pre><code>    media/arifhasnat/1ED0E5663F78E3C1/
AjkerDeal/CustomNavigation/MyApplication/
app/src/main/java/navigationdrawer/arifhasnat
/com/androidcustomnavigationdrawer/
MainActivity.java:22: error: incompatible types:
 FragmentOne cannot be converted to Fragment
fragmentTransaction.replace(R.id.frame_one, new FragmentOne()).commit();
</code></pre>

<p>Here my code: Its the Main Activity where i called Fragment class </p>

<pre><code>   package navigationdrawer.arifhasnat.com.androidcustomnavigationdrawer;

    import android.os.Bundle;

    import android.support.v4.app.FragmentTransaction;
    import android.support.v4.widget.DrawerLayout;
    import android.support.v7.app.AppCompatActivity;
    import android.widget.ListView;


    public class MainActivity extends AppCompatActivity {

        private String[] mNavigationDrawerItemTitles;
        private DrawerLayout mDrawerLayout;
        private ListView mDrawerList;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.nav);


            FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
            fragmentTransaction.replace(R.id.frame_one, new FragmentOne()).commit();


        }

    }
</code></pre>

<p>Fragment :</p>

<pre><code>package navigationdrawer.arifhasnat.com.androidcustomnavigationdrawer;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * Created by arifhasnat on 1/5/16.
 */
public class FragmentOne extends Fragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view= inflater.inflate(R.layout.fragment1,container,false);
        return view;


    }
}
</code></pre>
