??在Fragment跳轉(zhuǎn)時會出現(xiàn)NoSuchFieldError錯誤兴革,經(jīng)過與已有項(xiàng)目對比排查發(fā)現(xiàn)是implementation 'androidx.appcompat:appcompat:1.1.0'的引用版本問題抛寝,改回1.0.2就不存在問題了陪每。如果是需要使用1.1.0版本,可以切換me.yokeyword.fragmentation到me.yokeyword.fragmentationx筋帖。
java.lang.NoSuchFieldError: No field mActive of type Landroid/util/SparseArray; in class Landroidx/fragment/app/FragmentManagerImpl; or its superclasses (declaration of 'androidx.fragment.app.FragmentManagerImpl' appears in /data/app/com.xxx.demo-5kBnCluNPsrYjqaIqD3UZg==/base.apk)
at androidx.fragment.app.FragmentationMagician.getActiveFragments(FragmentationMagician.java:145)
at me.yokeyword.fragmentation.helper.internal.VisibleDelegate.dispatchSupportVisible(VisibleDelegate.java:158)
at me.yokeyword.fragmentation.helper.internal.VisibleDelegate.safeDispatchUserVisibleHint(VisibleDelegate.java:131)
at me.yokeyword.fragmentation.helper.internal.VisibleDelegate.onHiddenChanged(VisibleDelegate.java:102)
at me.yokeyword.fragmentation.SupportFragmentDelegate.onHiddenChanged(SupportFragmentDelegate.java:205)
at me.yokeyword.fragmentation.SupportFragment.onHiddenChanged(SupportFragment.java:95)