"Collection contains no element matching the predicate." error after applying plugin
See original GitHub issueDescribe 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
- Apply Gordon to an Android app module.
- Setup was described in description blog
- Synchronise gradle
- See error
Gradle sync failed Collection contains no element matching the predicate.
Expected behavior Gradle sync successfully finished
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@anlosar I’m not sure exactly why using
whenTaskAdded
causes this problem, but I can tell you thatwhenTaskAdded
is not recommended for use anymore.tasks.configureEach
is the replacement that respects task configuration avoidance.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.