Error while emulating the code in chapter8

I have used androidx libraries:
below is the error message
Caused by: java.lang.IllegalStateException: Fragment com.bidnerdintent.android.criminalintent.CrimeListFragment must be a public static class to be properly recreated from instance state.
at androidx.fragment.app.FragmentTransaction.doAddOp(FragmentTransaction.java:165)
at androidx.fragment.app.BackStackRecord.doAddOp(BackStackRecord.java:179)
at androidx.fragment.app.FragmentTransaction.add(FragmentTransaction.java:134)
at com.bidnerdintent.android.criminalintent.SingleFragmentActivity.onCreate(SingleFragmentActivity.java:20)