I am trying to navigate from a fragment to another one fragment after the creation of post. It shows the Declared target fragment that does not belong to this FragmentManager. I have upgraded to androidx.fragment manager
final FragmentTransaction transaction = getFragmentManager().beginTransaction();
BaseFragment fragment = HomeFeed.newInstance(mValuesItem, CreatePost.this);
final String tag = BaseUtils.getTag(fragment);
transaction
.replace(getFragmentContainerId(), fragment, tag)
.addToBackStack(tag)
.commit();