Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Robolectric: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.robolectric.android.internal.ParallelUniverse

I ran the migration as listed here

After running the tests, I get the error java.lang.RuntimeException: java.lang.ClassNotFoundException: org.robolectric.android.internal.ParallelUniverse with an internal stack trace.

Did anyone encounter this and know how to fix this?

edit:

Added Gradle dependencies:

testImplementation ("org.robolectric:robolectric:4.1")
testImplementation "org.robolectric:shadows-httpclient:4.1"
testImplementation "org.robolectric:shadows-multidex:4.1"
like image 209
dor Avatar asked Jan 01 '19 08:01

dor


1 Answers

So turns out when we tried running the tests using the "none" option, we couldn't run them because the command was too long. Running with the classpath option simply does not import the rest of the Android environment, but simply runs the test. Running with the "JAR" option gives the correct result, and the test runs as expected Cheers, and thanks for the help!

like image 166
dor Avatar answered Nov 08 '22 17:11

dor