java build_error ai_generated true

未找到 ID 为 'org.springframework.boot' 的插件。请检查插件是否在 plugins 块中正确声明。

Plugin with id 'org.springframework.boot' not found. Please check that the plugin is correctly declared in the plugins block.

ID: java/gradle-missing-plugin-id

其他格式: JSON · Markdown 中文 · English
80%修复率
85%置信度
0证据数
2025-06-30首次发现

版本兼容性

版本状态引入弃用备注
7+ active

根因分析

未应用 Spring Boot 插件,或 plugins 块中缺少版本。

English

The Spring Boot plugin is not applied, or the version is missing in the plugins block.

generic

解决方案

  1. 95% 成功率 Apply the Spring Boot plugin with a valid version
    plugins { id 'org.springframework.boot' version '3.2.0' }
  2. 90% 成功率 Use the plugin management block to define the version centrally
    pluginManagement { plugins { id 'org.springframework.boot' version '3.2.0' } }

无效尝试

常见但无效的做法:

  1. Using the full class name instead of the plugin ID 90% 失败

    Gradle requires the plugin ID, not the class name.

  2. Adding the plugin to buildscript dependencies without using the plugins block 80% 失败

    The plugins block is the recommended way; buildscript may not apply the plugin correctly.