Upgrading Kotlin to 1.5.0 in Android project fails

Upgrading Kotlin to 1.5.0 in Android project fails

After upgrading Kotlin from 1.4.32 to 1.5.0 the build fails.

I have no idea how to solve this. Googling the problem didn’t help, I found nothing. Do you have any idea how to solve this?


Caused by: java.util.NoSuchElementException: Collection is empty. at kotlin.collections.CollectionsKt___CollectionsKt.single(_Collections.kt:562) at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt.kotlinTestCapabilityForJvmSourceSet(KotlinDependenciesManagement.kt:283) at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt.access$kotlinTestCapabilityForJvmSourceSet(KotlinDependenciesManagement.kt:1) at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt$configureKotlinTestDependency$1$1$3.invoke(KotlinDependenciesManagement.kt:226) at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt$configureKotlinTestDependency$1$1$3.invoke(KotlinDependenciesManagement.kt:217) at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt$sam$org_gradle_api_Action$0.execute(KotlinDependenciesManagement.kt) at org.gradle.internal.ImmutableActionSet$SetWithFewActions.execute(ImmutableActionSet.java:285) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.runDependencyActions(DefaultConfiguration.java:469) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationResolvableDependencies.getDependencies(DefaultConfiguration.java:1666) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationResolvableDependencies_Decorated.getDependencies(Unknown Source) at com.android.build.gradle.internal.dependency.VariantDependencies.getIncomingRuntimeDependencies(VariantDependencies.java:159) at com.android.build.gradle.tasks.AnalyzeDependenciesTask$CreationAction.configure(AnalyzeDependenciesTask.kt:188) at com.android.build.gradle.tasks.AnalyzeDependenciesTask$CreationAction.configure(AnalyzeDependenciesTask.kt:160) at com.android.build.gradle.internal.tasks.factory.TaskConfigurationActions.postRegisterHook(TaskFactoryUtils.kt:109) at com.android.build.gradle.internal.tasks.factory.TaskFactoryUtils.registerTask(TaskFactoryUtils.kt:44) at com.android.build.gradle.internal.tasks.factory.TaskFactoryImpl.register(TaskFactoryImpl.kt:45) ...

submitted by /u/brain_trapp
[link] [comments]