想开发一个intellij的插件,从github创建模版导入到 intellij IDEA 2021.2.3(Community Edition)后编辑报错
A problem occurred configuring root project 'test_intellij_plugin'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.1.6.
Required by:
project : > org.jetbrains.intellij:org.jetbrains.intellij.gradle.plugin:1.1.6
> No matching variant of org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.1.6 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.2' but:
- Variant 'apiElements' capability org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.1.6 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.2')
- Variant 'runtimeElements' capability org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.1.6 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.2')
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- 原因是 intellij 2020版本之后 需要使用jdk 11
- 安装jdk 11
- 再Build Tools里把Gradle gradle jvm:设置成 jdk11 编译就通过了
intellij plugins.png
参考链接:https://youtrack.jetbrains.com/issue/GO-11689
https://youtrack.jetbrains.com/issue/GO-11689#focus=Comments-27-5184992.0-0
网友评论