After updating my Robolectric version, I got the following compilation issue
Caused by: org.gradle.api.internal.artifacts.transform.TransformException: Failed to transform bcprov-jdk15on-1.68.jar (org.bouncycastle:bcprov-jdk15on:1.68) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 59
Build gradle dep.
testImplementation "org.robolectric:robolectric:4.6.1"
The previous version was 4.5.1.
The similar issue have already opened an marked as resolved. See here