idea 2018 自带gradle版本4.1 我改properties文件为7.5
启动项目,sync 时报错,如标题。
解决步骤:
1.我尝试更改jdk 9 和11都一样报错。
2.我尝试改properties文件为6.4不报错。
3.我仍然使用properties文件为7.5,不理会build窗口的这个错误。在右侧的gradle插件build,clean这些正常使用。
所以我猜是idea版本不适应高版本的gradle(超过6.4的某个版本),有偿寻求网友帮助!具体的触发原因,gradle哪个类和idea哪里不匹配,造成这个报错?
* What went wrong:
org.gradle.api.tasks.SourceSet.getCompileConfigurationName()Ljava/lang/String;
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
java.lang.NoSuchMethodError: org.gradle.api.tasks.SourceSet.getCompileConfigurationName()Ljava/lang/String;
at org.jetbrains.plugins.gradle.tooling.util.resolve.CompileDependenciesProvider.resolve(CompileDependenciesProvider.java:75)
at org.jetbrains.plugins.gradle.tooling.util.resolve.DependencyResolverImpl.resolveDependencies(DependencyResolverImpl.java:167)
省略中间大部分
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
标签:tasks,Java,java,sourceset,gradle,--,resolve,报错,org
From: https://blog.51cto.com/u_6132776/7163295