NoSuchMethodError for FragmentManager.getFragmentFactory
问题 I'm trying to use the new FragmentScenario APIs of the androidx testing libraries but the test fails trying to launch the fragment scenario like so: fragmentScenario = launchFragmentInContainer<MyFragment>(args) The stacktrace is: java.lang.NoSuchMethodError: androidx.fragment.app.FragmentManager.getFragmentFactory()Landroidx/fragment/app/FragmentFactory; at androidx.fragment.app.testing.FragmentScenario$1.perform(FragmentScenario.java:178) at androidx.fragment.app.testing.FragmentScenario$1