The method replace (int, Fragment, String) in the type FragmentTransaction is not applicable for the, fragmentreplace
Zookeeper
The method replace (int, Fragment, String) in the type FragmentTransaction is not applicable for the arguments (int, SettingFragment, String)
I encountered such a strange error message today. I found that the imported package has a problem with import android. app. Fragment;
Import android. app. FragmentManager; in fact, I should use import android. support. v4.app. Fragment;
Import android. support. v4.app. fragmentManager; then, I checked the differences between the API and the import android. app. fragment can only be used when the API version is later than 11, excluding getFragmentManager () andGetsuppfrfragmentmanager ()
Although the two methods do not report errors when writing code like this, the above error message is always prompted during the execution of replace (int, Fragment, String ).