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.

java.util.NoSuchElementException: Sequence contains no element matching the predicate

See original GitHub issue

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 ./gradlew ktlintCheck

> Task :app:runKtlintFormatOverInternalSourceSet FAILED
> Task :app:runKtlintFormatOverDebugSourceSet FAILED
> Task :app:runKtlintFormatOverMainSourceSet FAILED

FAILURE: Build completed with 3 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:runKtlintFormatOverInternalSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
   > java.util.NoSuchElementException: Sequence contains no element matching the predicate.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:runKtlintFormatOverDebugSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
   > java.util.NoSuchElementException: Sequence contains no element matching the predicate.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:runKtlintFormatOverMainSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
   > java.util.NoSuchElementException: Sequence contains no element matching the predicate.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 6s
45 actionable tasks: 11 executed, 34 up-to-date

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
nuhkocacommented, Dec 7, 2021

Hello, please note this issue has been solved for me in version 0.44.0-SNAPSHOT. Suggesting people here testing out for themselves and then we can close the issue if it is working well for everybody. Thanks!

1reaction
nuhkocacommented, Dec 1, 2021

This PR highly likely will fix this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Collection contains no element matching the predicate
I'm using the Room library, and I'm getting the following error message when I try to build the app: e: [kapt] An exception...
Read more >
Sequence contains no element matching the predicate ...
Caused by: java.util.NoSuchElementException: Sequence contains no element matching the predicate. at org.jetbrains.kotlinx.serialization.compiler.backend.js ...
Read more >
NavHost java.util.NoSuchElementException: List contains no ...
NavHost java.util.NoSuchElementException: List contains no element matching the predicate for 2.5.0-alpha04+.
Read more >
I thought it was first or firstOrNull. Or is there a new Kotlin ...
util.NoSuchElementException: Collection contains no element matching the predicate. Whereas "firstOrNull" returns the first result even if there ...
Read more >
collection contains no element matching the predicate meaning
android studio 3.0 implementation 'zlc.season:rxdownload3:1.1.8' java.util.NoSuchElementException: Collection contains no element matching the predicate.
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