Gradle构建报错:':tesseract'项目未找到问题求助
:tesseract项目 Alright, let's tackle this ':tesseract' project not found error you're facing. The core issue here comes down to how Gradle handles multi-project builds—only the root project's settings.gradle defines the full set of projects in the build; subprojects' settings.gradle files don't get automatically loaded when you run the build from the root.
为什么会报错?
Your GregTech project (the root here) has its settings.gradle set up to include the :antimatter subproject, but it doesn't mention :tesseract at all. When Gradle tries to evaluate the :antimatter project, it sees the dependency on :tesseract but has no idea where that project lives because it wasn't declared in the root's settings.
修复步骤
You need to update your GregTech project's settings.gradle to include both :antimatter and :tesseract, specifying their correct file paths:
include ":antimatter", ":tesseract" project(":antimatter").projectDir = file("../AntimatterAPI") project(":tesseract").projectDir = file("../TesseractAPI")
额外验证点
- Double-check that the path
../TesseractAPIis correct relative to your GregTech project directory. Make sure theTesseractAPIfolder exists at that location with all its necessary Gradle files. - Your
antimatterproject'ssettings.gradleis still useful if you ever build it as a standalone project, but when building from the GregTech root, Gradle ignores that file—so all subproject declarations must live in the root's settings.
为什么之前的配置不够?
When you run a build from the GregTech root, Gradle only reads the root's settings.gradle to discover all projects in the build graph. The include ':tesseract' line in the antimatter project's settings doesn't get processed, so Gradle never adds that project to the build.
内容的提问来源于stack exchange,提问作者MightyDanp

