title: How to recreate from childFragmentManager?
body: <p>I am using a custom layout for my settings Fragment like this</p>
  <pre><code>class SettingsFragment : BaseFragment() {
  
      private var settings: FragmentSettingsBinding? = null
  
      override fun onCreateBaseView(
          inflater: LayoutInflater,
          parent: ViewGroup?,
          savedInstanceState: Bundle?
      ) {
          settings = FragmentSettingsBinding.inflate(inflater, parent, true)
      }
  
      override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
          super.onViewCreated(view, savedInstanceState)
  
          childFragmentManager.apply {
              popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
              beginTransaction().apply {
                  replace(R.id.settings, Settings())
                  commit()
              }
          }
      }
  
      open class Settings :
          PreferenceFragmentCompat(), Preference.OnPreferenceClickListener {
  
          override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
              setPreferencesFromResource(R.xml.preferences, rootKey)
          }
  
          override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
              super.onViewCreated(view, savedInstanceState)
             
              // recreate after some actions
         }
     }
  }
  </code></pre>
  <p>Everything works fins until it come to <code>recreate</code> and than happens this:</p>
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.example.myapp, PID: 16108
      java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.activities.MainActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.example.myapp.fragments.SettingsFragment$Settings: could not find Fragment constructor
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4031)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4197)
          at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:6334)
          at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:6199)
          at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:71)
          at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
          at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
          at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
          at android.app.ClientTransactionHandler.executeTransaction(ClientTransactionHandler.java:65)
          at android.app.ActivityThread.handleRelaunchActivityLocally(ActivityThread.java:6288)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2444)
          at android.os.Handler.dispatchMessage(Handler.java:106)
          at android.os.Looper.loopOnce(Looper.java:226)
          at android.os.Looper.loop(Looper.java:313)
          at android.app.ActivityThread.main(ActivityThread.java:8633)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)
       Caused by: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.example.myapp.fragments.SettingsFragment$Settings: could not find Fragment constructor
          at androidx.fragment.app.Fragment.instantiate(Fragment.java:630)
          at androidx.fragment.app.FragmentContainer.instantiate(FragmentContainer.java:57)
          at androidx.fragment.app.FragmentManager$2.instantiate(FragmentManager.java:448)
          at androidx.fragment.app.FragmentState.instantiate(FragmentState.java:81)
          at androidx.fragment.app.FragmentStateManager.&lt;init&gt;(FragmentStateManager.java:85)
          at androidx.fragment.app.FragmentManager.restoreSaveStateInternal(FragmentManager.java:2410)
          at androidx.fragment.app.Fragment.restoreChildFragmentState(Fragment.java:1934)
          at androidx.fragment.app.Fragment.onCreate(Fragment.java:1911)
          at androidx.fragment.app.Fragment.performCreate(Fragment.java:2981)
          at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:474)
          at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:257)
          at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:113)
          at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1374)
          at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2841)
          at androidx.fragment.app.FragmentManager.dispatchCreate(FragmentManager.java:2773)
          at androidx.fragment.app.Fragment.restoreChildFragmentState(Fragment.java:1935)
          at androidx.fragment.app.Fragment.onCreate(Fragment.java:1911)
          at androidx.navigation.fragment.NavHostFragment.onCreate(NavHostFragment.kt:169)
          at androidx.fragment.app.Fragment.performCreate(Fragment.java:2981)
          at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:474)
          at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:257)
          at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:113)
          at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1374)
          at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2841)
  E/AndroidRuntime:     at androidx.fragment.app.FragmentManager.dispatchCreate(FragmentManager.java:2773)
          at androidx.fragment.app.FragmentController.dispatchCreate(FragmentController.java:251)
          at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:252)
          at com.example.myapp.activities.MainActivity.onCreate(MainActivity.kt:39)
          at android.app.Activity.performCreate(Activity.java:8282)
          at android.app.Activity.performCreate(Activity.java:8262)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4005)
              ... 17 more
       Caused by: java.lang.NoSuchMethodException: com.example.myapp.fragments.SettingsFragment$Settings.&lt;init&gt; []
          at java.lang.Class.getConstructor0(Class.java:2363)
          at java.lang.Class.getConstructor(Class.java:1759)
          at androidx.fragment.app.Fragment.instantiate(Fragment.java:615)
              ... 48 more
  </code></pre>
  <p>I searched for similar cases and unfortunately, did not find any suitable solution.</p>
  <p>I use one single <code>MainActivity</code> with a <code>FragmentContainerView</code> on it. There is one <code>BaseFragment</code> with a custom layout and that layout owns my Settings as child <code>Fragment</code>.</p>
  <p>What did I wrong?</p>