Kaspresso icon indicating copy to clipboard operation
Kaspresso copied to clipboard

Build issues with Kaspresso 1.2.0

Open RuslanMingaliev opened this issue 5 years ago • 3 comments

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

RuslanMingaliev avatar Sep 24 '20 14:09 RuslanMingaliev

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
        }
    }
}

ZeGerm4n avatar Jan 06 '21 16:01 ZeGerm4n

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

abhisheksisodia avatar Feb 19 '21 14:02 abhisheksisodia

@RuslanMingaliev ?

matzuk avatar Mar 10 '21 10:03 matzuk

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

AzamatCherchesov avatar May 15 '23 08:05 AzamatCherchesov