title: Gradle: No candidates found for method call
body: <p>I am using IntelliJ and Gradle 7.3.3 to create a Kotlin library multiplatform, but I have the nexts errors with gradle compilation: <strong>No candidates found for method call...</strong>, in command-line compile good.</p>
  <p>My build.gradle file:</p>
  <pre><code>plugins {
      id 'org.jetbrains.kotlin.multiplatform' version '1.6.10'
  }
  
  group = 'com.example'
  version = '1.0-SNAPSHOT'
  
  repositories {
      mavenCentral()
  }
  
  kotlin {
      **jvm** {
          **compilations**.all {
              **kotlinOptions**.jvmTarget = '1.8'
          }
          **withJava**()
          **testRuns**[&quot;test&quot;].executionTask.configure {
              **useJUnitPlatform**()
          }
      }
      **js**(**BOTH**) {
          **browser** {
              **commonWebpackConfig** {
                  **cssSupport**.enabled = true
              }
          }
      }
      def hostOs = System.getProperty(&quot;os.name&quot;)
      def isMingwX64 = hostOs.startsWith(&quot;Windows&quot;)
      def nativeTarget
      if (hostOs == &quot;Mac OS X&quot;) nativeTarget = **macosX64**('native')
      else if (hostOs == &quot;Linux&quot;) nativeTarget = **linuxX64**(&quot;native&quot;)
      else if (isMingwX64) nativeTarget = **mingwX64**(&quot;native&quot;)
      else throw new GradleException(&quot;Host OS is not supported in Kotlin/Native.&quot;)
  
      
      sourceSets {
          commonMain {
  
          }
          commonTest {
              dependencies {
                  implementation kotlin('test')
              }
          }
          jvmMain {
  
          }
          jvmTest {
  
          }
          jsMain {
  
          }
          jsTest {
  
          }
          nativeMain {
  
          }
          nativeTest {
  
          }
      }
  }
  </code></pre>
  <p>All inside ** ... ** have the next problem: No candidates found for method call...</p>
  <p>I try Invalidate Caches/Restart..., re-install IntelliJ, re-import Gradle, etc.</p>
  <p>How can I fix this problem?</p>