java.lang.NoSuchMethodError: 'java.lang.String org.gradle.api.tasks.SourceSet.getCompileConfigurationName()'

org.jetbrains.plugins.gradle.model.ExternalProject build step fails with the error above when i try to import an existing gradle project into intellij. I can build and run the project outside of intellij. Any help will be highly appreciated. 

评论操作 固定链接

I ended updating to the latest version of gradle. I think the problem was the intellij gradle plugin was perhaps using an outdated version of gradle. For instance, I couldn't use testImplementation when declaring dependencies. And this command was the source of failure.