Error: The method add(int, Fragment, String) in the type FragmentTransaction is not applicable for the arguments (int, FragementTest, String)

change:

import android.app.FragmentManager;
import android.app.FragmentTransaction;

to:

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

or---

change:

import android.support.v4.app.Fragment;

to

import android.app.Fragment;

All the Fragment should be android.app.Fragment. If you want to use android.support.v4.app.Fragment, you should use getSupportFragmentManager() to get the Manager.

Tags:

Android