question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blocker (regression in 6.1.2): "Unable to find method 'com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector;'"

See original GitHub issue

Describe the bug Cannot evaluate Gradle project. My project uses Android Gradle Plugin version 4.1.2, Gradle version 6.8.3 and Jdk version 11.

Version of dependency-check used The problem occurs using version 6.1.2 (and 6.1.3) of the gradle plugin. It works fine in 6.1.1 and below.

Log file

Unable to find method 'com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector;'
com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector;

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
jeremylongcommented, Mar 27, 2021

I just bumped guava to 30.1.1-jre via f861019c9 and retested with your sample project and everything works.

1reaction
jeremylongcommented, Mar 26, 2021

@alwa One solution is to strictly enforce the use of Guava 28.1-jre:

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath('com.google.guava:guava'){
            version {
                strictly '28.1-jre'
            }
        }
        classpath "com.android.tools.build:gradle:4.1.3"
        classpath("org.owasp:dependency-check-gradle:6.1.3") 
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

com.google.common.collect.ImmutableList.toImmutableList ...
After cleaning up guava dependencies in my gradle file as in: testImplementation "com.google.guava:guava:28.2-jre" testImplementation ...
Read more >
com.google.common.collect.ImmutableList ... - Tabnine
private static List<SelectItem> buildSelectItems(List<String> columnNames) · return columnNames.stream() · map(QueryUtil::unaliasedName) · collect(toImmutableList() ...
Read more >
Chrome driver execution failed with java.lang ... - OneCompiler
java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector; at org.openqa.selenium.chrome.
Read more >
How to solve " java.lang.NoSuchMethodError "
Error that I was getting: java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.toImmutableSet()Ljava/util/stream/Collector;
Read more >
ImmutableList (Guava: Google Core Libraries for Java 23.0 API)
A builder for creating immutable list instances, especially public static final lists ("constant lists"). Method Summary. All Methods Static Methods Instance ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found