KasperskyLab / Kaspresso

Android UI test framework
https://kasperskylab.github.io/Kaspresso/
Apache License 2.0
1.78k stars 150 forks source link

Build issues with Kaspresso 1.2.0 #202

Closed RuslanMingaliev closed 1 year ago

RuslanMingaliev commented 3 years ago

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).

ZeGerm4n commented 3 years ago

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
        }
    }
}
abhisheksisodia commented 3 years ago

any update on this bug? I am facing same issue on my project

matzuk commented 3 years ago

@RuslanMingaliev ?

AzamatCherchesov commented 1 year ago

This is an obsolete issue. We don't have enough information on this issue. The latest version does not have this issue.