[2.30] NoSuchElementException in KotlinMetadata.java
See original GitHub issueSince updating to 2.30, compiling is failing during the kapt
step. Here’s the bottom of the stacktrace. Unfortunately I can’t tell from this error where the problem occurs.
Caused by: java.util.NoSuchElementException
at dagger.internal.codegen.extension.DaggerCollectors$ToOptionalState.getElement(DaggerCollectors.java:145)
at dagger.internal.codegen.extension.DaggerCollectors.lambda$static$1(DaggerCollectors.java:61)
at dagger.internal.codegen.kotlin.KotlinMetadata.findProperty(KotlinMetadata.java:260)
at dagger.internal.codegen.kotlin.KotlinMetadata.lambda$mapFieldToAnnotationMethod$8(KotlinMetadata.java:226)
at dagger.internal.codegen.kotlin.KotlinMetadata.mapFieldToAnnotationMethod(KotlinMetadata.java:222)
at dagger.internal.codegen.kotlin.KotlinMetadata.lambda$new$4(KotlinMetadata.java:122)
at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:167)
at dagger.internal.codegen.kotlin.KotlinMetadata.isMissingSyntheticAnnotationMethod(KotlinMetadata.java:321)
at dagger.internal.codegen.kotlin.KotlinMetadataUtil.isMissingSyntheticPropertyForAnnotations(KotlinMetadataUtil.java:77)
at dagger.internal.codegen.validation.DependencyRequestValidator.checkQualifiers(DependencyRequestValidator.java:77)
at dagger.internal.codegen.validation.DependencyRequestValidator.validateDependencyRequest(DependencyRequestValidator.java:68)
at dagger.internal.codegen.validation.InjectValidator.validateDependencyRequest(InjectValidator.java:256)
at dagger.internal.codegen.validation.InjectValidator.validateField(InjectValidator.java:212)
at dagger.internal.codegen.validation.InjectValidator.validateMembersInjectionType(InjectValidator.java:268)
at dagger.internal.codegen.validation.InjectBindingRegistryImpl.tryRegisterMembersInjectedType(InjectBindingRegistryImpl.java:281)
at dagger.internal.codegen.validation.InjectBindingRegistryImpl.tryRegisterMembersInjectedType(InjectBindingRegistryImpl.java:265)
at dagger.internal.codegen.InjectProcessingStep$1.visitVariableAsField(InjectProcessingStep.java:54)
at dagger.internal.codegen.InjectProcessingStep$1.visitVariableAsField(InjectProcessingStep.java:44)
at jdk.compiler/com.sun.tools.javac.code.Symbol$VarSymbol.accept(Symbol.java:1576)
at dagger.internal.codegen.InjectProcessingStep.process(InjectProcessingStep.java:76)
at dagger.internal.codegen.validation.TypeCheckingProcessingStep.lambda$process$0(TypeCheckingProcessingStep.java:51)
at com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:185)
at dagger.internal.codegen.validation.TypeCheckingProcessingStep.process(TypeCheckingProcessingStep.java:48)
at dagger.internal.codegen.validation.TypeCheckingProcessingStep.process(TypeCheckingProcessingStep.java:34)
at dagger.shaded.auto.common.BasicAnnotationProcessor$ProcessingStepAsStep.process(BasicAnnotationProcessor.java:495)
at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:228)
at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:208)
at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt)
at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:161)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:980)
... 42 more
Issue Analytics
- State:
- Created 3 years ago
- Reactions:14
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How to Fix the No Such Element Exception in Java - Rollbar
The NoSuchElementException in Java can be thrown by various accessor methods to indicate that the element being requested does not exist.
Read more >NoSuchElementException java.lang.Scanner - Stack Overflow
I would just use val input = Scanner(System.`in`). If you enter 9 integers in the console the initialization of the Packing objects should ......
Read more >How to Fix java.util.NoSuchElementException in Java?
NoSuchElementException: It is the child class of RuntimeException and hence it is an unchecked exception.
Read more >NoSuchElementException (Java Platform SE 8 )
Constructs a NoSuchElementException , saving a reference to the error message string s for later retrieval by the getMessage method.
Read more >A crash -- java.util.NoSuchElementException: List is empty.
I could not replicate in any of my devices or emulators, It's reported in firebase crashlytics. Error log: Fatal Exception: java.util.NoSuchElementException: ...
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
By any chance do you use Kotlin’s Android extensions (
apply plugin: 'kotlin-android-extensions'
)?I’ll complement this answer with androidExtensions .kts version:
Just a small not also:
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.