Kaspresso
Kaspresso copied to clipboard
Build issues with Kaspresso 1.2.0
Too many people face significant problems with new Kaspresso version.
Build fails with error:
java.lang.NoSuchMethodError: No direct method <init>(ILjava/lang/Object;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)V in class Lkotlin/jvm/internal/FunctionReferenceImpl; or its super classes (declaration of 'kotlin.jvm.internal.FunctionReferenceImpl' appears in com.example.company.apk)
One of the possible reasons is using Kotlin 1.4 (in Kaspresso) with no backward-compatibility with Kotlin 1.3 (in the application module).
try using following in your app: build.gradle:
configurations.all {
resolutionStrategy.eachDependency { org.gradle.api.artifacts.DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'org.jetbrains.kotlin' && (requested.name == 'kotlin-stdlib-jdk7' || requested.name == 'kotlin-stdlib')) {
details.useVersion kotlin_version
}
}
}
any update on this bug? I am facing same issue on my project
@RuslanMingaliev ?
This is an obsolete issue. We don't have enough information on this issue. The latest version does not have this issue.