0

I've updated kotlin from 1.3.61 to 1.3.70 in my multiplatform project with android, jvm, ios and macosx64 targets not changing other code and whenever a gradle sync is attempted I get the following message (and the project build fails, of course):

CONFIGURE FAILED in 3s
Unable to find method 'org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension.macosX64()Lorg/jetbrains/kotlin/gradle/plugin/mpp/KotlinNativeTargetWithHostTests;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

I've tried the solutions described above, I also tried to clear .gradle/caches, but nothing changed. What might be the problem?

Overpass
  • 433
  • 5
  • 12

1 Answers1

4

This happened because I had a buildSrc module where the dependencies' artifact names are declared like this:

object Deps {

   object Android {
      // artifacts
   }

   object Native {
      // artifacts
   }

   // ...
}

and I had updated the kotlin dependency there, but I had forgotten to update the kotlin version in the build.gradle.kts of the buildSrc directory itself.

Overpass
  • 433
  • 5
  • 12