英文:
No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.5 was found
问题
I updated the springboot version 2.7.9 to 3.0.5 in build.gradle and not able to build project, it says:
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.5 was found. The consumer was configured to find a runtime of a library compatible with Java 14, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.4.2' but:
- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.5 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 17 and the consumer needed a runtime of a component compatible with Java 14.
I've also tried to change java version from 17 to 14 but still getting the same error.
英文:
I updated the springboot version 2.7.9 to 3.0.5 in build.gradle and not able to build project, it says
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.5 was found. The consumer was configured to find a runtime of a library compatible with Java 14, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.4.2' but:
- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.5 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 17 and the consumer needed a runtime of a component compatible with Java 14.
I've also tried to changed java version from 17 to 14 but still getting same.
答案1
得分: 0
请确保您使用Java 17或更高版本来运行Gradle。
如果通过命令行运行构建,请检查java -version
。
如果通过IDE(例如,IDEA)运行构建,请确保您的IDE使用正确的Java版本。例如,对于IDEA,可以在“设置 -> 构建,执行,部署 -> Gradle -> Gradle JVM”中完成。
英文:
You need to ensure you run gradle with java 17 or higher.
If you run build via the command line, please check java -version
If you run a build via IDE (for example, IDEA), ensure your IDE uses the correct Java. For example, for IDEA it can be done in Settings -> Build,execution,deployment -> Gradle -> Gradle JVM
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论