question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.IllegalStateException: Fragment already added

See original GitHub issue

Hi,

I got this error when I tapped the 5th tab as soon as the UI rendered:

E/AndroidRuntime(28502): java.lang.IllegalStateException: Fragment already added: GenericProductListFragment{3147a7ad #2 id=0x7f0d026f}
E/AndroidRuntime(28502):    at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1209)
E/AndroidRuntime(28502):    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:674)
E/AndroidRuntime(28502):    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1501)
E/AndroidRuntime(28502):    at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:490)
E/AndroidRuntime(28502):    at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:163)
E/AndroidRuntime(28502):    at android.support.v4.view.ViewPager.populate(ViewPager.java:1072)
E/AndroidRuntime(28502):    at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:554)
E/AndroidRuntime(28502):    at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:513)
E/AndroidRuntime(28502):    at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:494)
E/AndroidRuntime(28502):    at com.ogaclejapan.smarttablayout.SmartTabLayout$TabClickListener.onClick(SmartTabLayout.java:474)
E/AndroidRuntime(28502):    at android.view.View.performClick(View.java:4780)
E/AndroidRuntime(28502):    at android.view.View$PerformClick.run(View.java:19866)
E/AndroidRuntime(28502):    at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(28502):    at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(28502):    at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(28502):    at android.app.ActivityThread.main(ActivityThread.java:5254)
E/AndroidRuntime(28502):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(28502):    at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(28502):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime(28502):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Thanks, Siddharth

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ogaclejapancommented, May 17, 2015

👍

1reaction
nehagarg702commented, Apr 16, 2020

can ypu tell. How you fixed this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

IllegalStateException: Fragment already added in the tabhost ...
Yes, you just have to put that code i have mentioned in my answer above...It means that your fragment is already added in...
Read more >
java.lang.IllegalStateException Fragment already added: (tag ...
App is in foreground when this crash occurs. Fatal Exception: java.lang.IllegalStateException: Fragment already added: q{85a25e4} (e25964d6-8e83 ...
Read more >
java.lang.IllegalStateException: Fragment already added ...
Crash Signature: [@ java.lang.IllegalStateException: Fragment already added: AboutHome{415cbe68 #0 id=0x7f07006d abouthome}: at android.support.v4.app.
Read more >
IllegalStateException: Fragment already added in the tabhost ...
Android : IllegalStateException : Fragment already added in the tabhost fragment [ Beautify Your Computer ...
Read more >
안드로이드 Fragment already added 오류 해결 방법
안드로이드 앱에서 동일한 Fragment 객체로 FragmentTransaction.add() 메소드를 2 ... java.lang.IllegalStateException: Fragment already added: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found