halo-dev / plugin-starter

Halo 2.0 插件开发快速开始模板

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

执行 gradlew.bat pnpmInstall时报异常

nageslan opened this issue · comments

commented

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'plugin-starter'.

Could not resolve all files for configuration ':classpath'.
Could not resolve run.halo.gradle:halo-gradle-plugin:0.0.4.
Required by:
project : > run.halo.plugin.devtools:run.halo.plugin.devtools.gradle.plugin:0.0.4
> No matching variant of run.halo.gradle:halo-gradle-plugin:0.0.4 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0' but:
- Variant 'apiElements' capability run.halo.gradle:halo-gradle-plugin:0.0.4 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
- Variant 'runtimeElements' capability run.halo.gradle:halo-gradle-plugin:0.0.4 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.0')

  • 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.

BUILD FAILED in 1s

C:\Users\Administrator\Desktop\Demo\Demo\Java\plugin-starter>

commented

又要17又要8的有点看不懂

commented

@nageslan 我使用 windows 尝试并没有发现你所说的问题,你使用的 JDK 版本是多少,请确保是 JDK17 https://docs.halo.run/developer-guide/core/prepare
image

commented

原来是用这个命令构建吗