ava.lang.IllegalArgumentException: Test class can only have one constructor

Google Groups | Ian Hunter | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Problem with RE 3.0-rc2

    Google Groups | 2 years ago | Ian Hunter
    ava.lang.IllegalArgumentException: Test class can only have one constructor

    Root Cause Analysis

    1. ava.lang.IllegalArgumentException

      Test class can only have one constructor

      at org.junit.runners.model.TestClass.<init>()
    2. JUnit
      BlockJUnit4ClassRunner.<init>
      1. org.junit.runners.model.TestClass.<init>(TestClass.java:48)
      2. org.junit.runners.ParentRunner.createTestClass(ParentRunner.java:88)
      3. org.junit.runners.ParentRunner.<init>(ParentRunner.java:83)
      4. org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)
      4 frames
    3. Roboelectric
      RobolectricTestRunner.runChild
      1. org.robolectric.RobolectricTestRunner$HelperTestRunner.<init>(RobolectricTestRunner.java:504)
      2. org.robolectric.RobolectricTestRunner.getHelperTestRunner(RobolectricTestRunner.java:277)
      3. org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:207)
      4. org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:185)
      5. org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:54)
      5 frames
    4. 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
    5. Roboelectric
      RobolectricTestRunner$1.evaluate
      1. org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:149)
      1 frame
    6. JUnit
      JUnitCore.run
      1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      2. org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      2 frames
    7. IntelliJ junit4 module
      JUnit4IdeaTestRunner.startRunnerWithArgs
      1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
      1 frame
    8. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
      2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
      2 frames
    9. Java RT
      NativeMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      2 frames
    10. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
      1 frame