Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaceFragment方法崩溃 #26

Open
eternallyjie opened this issue Apr 17, 2021 · 0 comments
Open

replaceFragment方法崩溃 #26

eternallyjie opened this issue Apr 17, 2021 · 0 comments

Comments

@eternallyjie
Copy link

Issues Guideline

Following information can help us to resolve the issue faster.

  • Library version 1.0.6
  • Support-v4 version
  • Logs
  • Screenshots

In addition, we do not accept issues unrelated to Fragmentation.

使用replaceFragment方法,多次快速切换的时候报错,如下:
java.lang.IllegalStateException: Fragment no longer exists for key f0: unique id 7ff9f5f2-0a41-4fc4-a9d5-1519e3c56f6d
at androidx.fragment.app.FragmentManagerImpl.getFragment(FragmentManagerImpl.java:365)
at androidx.fragment.app.FragmentStatePagerAdapter.restoreState(FragmentStatePagerAdapter.java:309)
at androidx.viewpager.widget.ViewPager.onRestoreInstanceState(ViewPager.java:1461)
at android.view.View.dispatchRestoreInstanceState(View.java:15805)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3274)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3282)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3282)
at android.view.View.restoreHierarchyState(View.java:15783)
at androidx.fragment.app.Fragment.restoreViewState(Fragment.java:548)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:907)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:439)
at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824)
at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727)
at androidx.fragment.app.FragmentManagerImpl$2.run(FragmentManagerImpl.java:150)
at android.os.Handler.handleCallback(Handler.java:761)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6623)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant