Hi! I just updated a bunch of dependencies (and gradle from 7.1 to 8.0.2) on an older project and got this very cryptic error (posted in thread), googling didn't get any really helpful results...
dave08
03/28/2023, 7:50 AM
Task :kaptGenerateStubsKotlin FAILED
e: java.lang.IllegalStateException: SimpleTypeImpl should not be created for error type: ErrorScope{Error scope for class <Error class: unknown class> with arguments: org.jetbrains.kotlin.types.IndexedParametersSubstitution@15297228}
[Error type: Unresolved type for Flow<T>]
at org.jetbrains.kotlin.types.SimpleTypeImpl.<init>(KotlinTypeFactory.kt:230)
at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleTypeWithNonTrivialMemberScope(KotlinTypeFactory.kt:161)
at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleType(KotlinTypeFactory.kt:88)
j
Javier
03/28/2023, 8:12 AM
Looks like an issue with ksp, not Gradle. Are you using compatible Kotlin and KSP versions?
d
dave08
03/28/2023, 8:58 AM
Nope, in the end it was bad imports (I upgraded from an old coroutines library...). But the error was in Kapt and not in the actual build... which is VERY weird...
j
Javier
03/28/2023, 10:02 AM
Oh yeah, I was thinking on ksp but it is a kapt task. Maybe an old cached file that is not deleted?