java.lang.IllegalStateException: Base context already set

GitHub | dlew | 2 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.

Root Cause Analysis

  1. java.lang.IllegalStateException

    Base context already set

    at android.content.ContextWrapper.attachBaseContext()
  2. Android Platform
    Activity.attach
    1. android.content.ContextWrapper.attachBaseContext(ContextWrapper.java:61)
    2. android.view.ContextThemeWrapper.attachBaseContext(ContextThemeWrapper.java:45)
    3. android.app.Activity.attach(Activity.java:4965)
    3 frames
  3. Roboelectric
    FragmentController$1.run
    1. org.robolectric.util.ReflectionHelpers.callInstanceMethod(ReflectionHelpers.java:195)
    2. org.robolectric.internal.runtime.Api19RuntimeAdapter.callActivityAttach(Api19RuntimeAdapter.java:19)
    3. org.robolectric.util.ActivityController.attach(ActivityController.java:56)
    4. org.robolectric.util.FragmentController.attach(FragmentController.java:35)
    5. org.robolectric.util.FragmentController$1.run(FragmentController.java:43)
    5 frames
  4. Roboelectric HTTP
    CoreShadowsAdapter$2.runPaused
    1. org.robolectric.shadows.ShadowLooper.runPaused(ShadowLooper.java:304)
    2. org.robolectric.shadows.CoreShadowsAdapter$2.runPaused(CoreShadowsAdapter.java:45)
    2 frames
  5. Roboelectric
    FragmentController.create
    1. org.robolectric.util.FragmentController.create(FragmentController.java:40)
    2. org.robolectric.util.FragmentController.create(FragmentController.java:52)
    2 frames
  6. com.trello.rxlifecycle
    RxFragmentLifecycleTest.testRxFragment
    1. com.trello.rxlifecycle.components.RxFragmentLifecycleTest.testRxFragment(RxFragmentLifecycleTest.java:50)
    1 frame
  7. JUnit
    RunBefores.evaluate
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    5 frames
  8. Roboelectric
    RobolectricTestRunner.runChild
    1. org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:251)
    2. org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:188)
    3. org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:54)
    3 frames
  9. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    5 frames
  10. Roboelectric
    RobolectricTestRunner$1.evaluate
    1. org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:152)
    1 frame
  11. JUnit
    JUnitCore.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    2. org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    2 frames
  12. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
    1 frame