Robolectric conflict versions

java.lang.NoSuchMethodError
Javadoc
Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.

Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed. @author unascribed @since JDK1.0

at org.robolectric.ConfigMerger.getConfig
at org.robolectric.RobolectricTestRunner.getConfig
at org.robolectric.RobolectricTestRunner.getChildren
at org.junit.runners.ParentRunner.getFilteredChildren
(source)
at org.junit.runners.ParentRunner.getDescription
(source)
4 frames hidden

Typical Exception Messages

  1. org.robolectric.annotation.Config$Builder.defaults()Lorg/robolectric/annotation/Config$Builder;
  2. com.google.common.collect.Lists.reverse(Ljava/util/List;)Ljava/util/List;

Solution

JaviRpo, 3 weeks ago

There are different Robolectric dependencies like robolectric, robolectric-annotations, robolectric-utils and others.

You need to check the correct version that works with each other. You can check this in the Maven Central

External results for this pattern (3)

  1. tonyyang924via GitHub1 month ago
    org.robolectric.annotation.Config$Builder.defaults()Lorg/robolectric/annotation/Config$Builder;
    Show stack trace
  2. 1ud0v1cvia GitHub3 months ago
    com.google.common.collect.Lists.reverse(Ljava/util/List;)Ljava/util/List;
    Show stack trace
  3. jongerrishvia GitHub3 months ago
    org.robolectric.annotation.Config$Builder.defaults()Lorg/robolectric/annotation/Config$Builder;
    Show stack trace