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.

"Collection contains no element matching the predicate." error after applying plugin

See original GitHub issue

Describe the bug Hello, I wanted to use your runner, and faced the error. My root gradle:

dependencies {
    ...
     classpath "com.banno.gordon:gordon-plugin:1.6.2"
 }

Build was successfull. After that I tried to apply to my module:

apply plugin: 'com.android.application'
apply plugin: "com.banno.gordon"
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

And received error. To Reproduce

  1. Apply Gordon to an Android app module.
  2. Setup was described in description blog
  3. Synchronise gradle
  4. See error Gradle sync failed Collection contains no element matching the predicate. Expected behavior Gradle sync successfully finished

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
joshschrievercommented, Jul 16, 2021

@anlosar I’m not sure exactly why using whenTaskAdded causes this problem, but I can tell you that whenTaskAdded is not recommended for use anymore. tasks.configureEach is the replacement that respects task configuration avoidance.

1reaction
joshschrievercommented, May 12, 2021

There wasn’t really a conclusion to that discussion, other than that Gordon 1.6.5 and 1.7.0 have changes that could potentially help with this issue. I told people there to try updating and reopen if the issue was still present, but I made a mistake - apparently discussions are either open or deleted, there’s no way to close/archive them and have them remain readable.

@bartsg can you try updating to Gordon 1.7.0? And then if you still have this issue, try running a gradle task on the commandline with the --stacktrace flag added, and reopen this issue and post the stacktrace.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Collection contains no element matching the predicate
After spending a day for this error, I identified the issue to be presence of an empty constructor in the @Entity class. constructor()...
Read more >
java.util.NoSuchElementException: Sequence contains no ...
Hello, I've updated Ktlint to 10.2.0 and the plugin to 0.43.0-SNAPSHOT but I am getting below error when I run .
Read more >
Collection contains no element matching the predicate" for ...
I added the following code to a new Kotlin/Native project: data class MyDataClass(val nothing: Nothing?)
Read more >
collection contains no element matching the predicate meaning
Returns index of the last element matching the given predicate, or -1 if the collection does not contain such element. Selects all elements...
Read more >
Sample app doesn't build [132402803] - Issue Tracker - Google
NoSuchElementException : Collection contains no element matching the predicate. ... Build console logs show: USING OVERRIDDEN KOTLIN GRADLE PLUGIN DEPENDENCY ...
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