Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/338.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 渐变复合构建。找不到项目。包括保龄球不起作用?_Java_Gradle_Build.gradle - Fatal编程技术网

Java 渐变复合构建。找不到项目。包括保龄球不起作用?

Java 渐变复合构建。找不到项目。包括保龄球不起作用?,java,gradle,build.gradle,Java,Gradle,Build.gradle,我有两个项目,我的应用程序和字符串utils。我的应用程序依赖于字符串utils。构建我的应用程序时,我得到: 在根项目“我的应用”中找不到“具有路径的项目”:字符串utils 你不应该在这里工作吗 我的梯度扫描是 /我的应用程序/设置.gradle: rootProject.name = 'my-app' includeBuild '../string-utils' rootProject.name = 'string-utils' /我的应用程序/build.gradle: plugin

我有两个项目,我的应用程序和字符串utils。我的应用程序依赖于字符串utils。构建我的应用程序时,我得到:

在根项目“我的应用”中找不到“具有路径的项目”:字符串utils

你不应该在这里工作吗

我的梯度扫描是

/我的应用程序/设置.gradle:

rootProject.name = 'my-app'
includeBuild '../string-utils'
rootProject.name = 'string-utils'
/我的应用程序/build.gradle:

plugins {
    id 'java'
    id 'application'
    id 'idea'
}
group "org.sample"
version "1.0"
application {
    mainClassName = "org.sample.myapp.Main"
}
dependencies {
  implementation project(':string-utils')
}
repositories {
    jcenter()
}
/字符串utils/settings.gradle:

rootProject.name = 'my-app'
includeBuild '../string-utils'
rootProject.name = 'string-utils'
运行时:

/my-app$ gradle build --scan --info

Initialized native services in: /home/andrew/.gradle/native
The client will now receive all logging from the daemon (pid: 202204). The daemon log file: /home/andrew/.gradle/daemon/6.2.1/daemon-202204.out.log
Starting 4th build in daemon [uptime: 38 mins 14.32 secs, performance: 99%, non-heap usage: 20% of 268.4 MB]
Using 128 worker leases.
Starting Build
Compiling settings file '/tmp/5/my-app/settings.gradle' using BuildScriptTransformer.
Settings evaluated using settings file '/tmp/5/my-app/settings.gradle'.
Projects loaded. Root project using build file '/tmp/5/my-app/build.gradle'.
Included projects: [root project 'my-app']
[composite-build] Configuring build: /tmp/5/string-utils

Configure project :string-utils
Evaluating project ':string-utils' using build file '/tmp/5/string-utils/build.gradle'.
Registering project ':string-utils' in composite build. Will substitute for module ':string-utils'.

Configure project :
Evaluating root project 'my-app' using build file '/tmp/5/my-app/build.gradle'.
Compiling build file '/tmp/5/my-app/build.gradle' using SubsetScriptTransformer.
Compiling build file '/tmp/5/my-app/build.gradle' using BuildScriptTransformer.

FAILURE: Build failed with an exception.

* Where:
Build file '/tmp/5/my-app/build.gradle' line: 19

* What went wrong:
A problem occurred evaluating root project 'my-app'.

Project with path ':string-utils' could not be found in root project 'my-app'.

已修复。需要更换

implementation project(':string-utils')