Gradle找不到项目(找不到路径为$的项目)
此项目(示例)依赖于父目录中定义的项目。它根本不是父目录项目构建的一部分。但是,Gradle从未在我的文件夹中找到包含项目的项目。父目录包含libGDX的多平台多项目库项目。到目前为止,我无法调用project()并在任何目录中找到一个Gradle找不到项目(找不到路径为$的项目),gradle,libgdx,Gradle,Libgdx,此项目(示例)依赖于父目录中定义的项目。它根本不是父目录项目构建的一部分。但是,Gradle从未在我的文件夹中找到包含项目的项目。父目录包含libGDX的多平台多项目库项目。到目前为止,我无法调用project()并在任何目录中找到一个 FAILURE: Build failed with an exception. * Where: Settings file '/home/athenacadence/git/gdx-complextext/example/settings.
FAILURE: Build failed with an exception.
* Where:
Settings file '/home/athenacadence/git/gdx-complextext/example/settings.gradle' line: 2
* What went wrong:
A problem occurred evaluating settings 'example'.
> Project with path '/../html' could not be found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
CONFIGURE FAILED
Total time: 0.124 secs
gdx complextext/example/settings.gradle
include 'desktop', 'android', 'ios', 'html', 'core', 'ios-moe'
includeBuild(project("/../html"))
gdx complextext/build.gradle
ext {
GROUPID = 'com.athenaeumapps.gdxcomplextext'
VERSION = '0.0.1-SNAPSHOT'
}
buildscript {
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
maven { url uri(System.getenv("INTEL_MULTI_OS_ENGINE_HOME") + "/gradle") }
}
dependencies {
classpath 'com.goharsha:gwt-opentype:0.1-SNAPSHOT'
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.2.0'
classpath group: 'org.multi-os-engine', name: 'moe-gradle', version: '1.1.+'
}
}
allprojects {
apply plugin: "eclipse"
ext {
appName = 'gdx-complextext'
gdxVersion = '1.9.6'
roboVMVersion = '2.2.0'
}
repositories {
mavenCentral()
mavenLocal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
group = GROUPID
version = VERSION
}
project(":android") {
configurations {
custom
compile.extendsFrom custom
}
eclipse {
project {
name = appName + "-android"
}
}
dependencies {
compile project(':core')
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
}
}
project(":core") {
apply plugin: 'java'
apply from: '../publish.gradle'
configurations {
custom
compile.extendsFrom custom
}
eclipse {
project {
name = appName + "-core"
}
}
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
}
}
project(":desktop") {
apply plugin: 'java'
apply from: '../publish.gradle'
configurations {
custom
compile.extendsFrom custom
}
eclipse {
project {
name = appName + "-desktop"
}
}
dependencies {
compile project(':core')
}
}
project(":html") {
apply plugin: 'java'
apply from: '../publish.gradle'
configurations {
custom
compile.extendsFrom custom
}
eclipse {
project {
name = appName + "-html"
}
}
dependencies {
compile project(':core')
}
dependencies {
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
}
}
project(":ios") {
apply plugin: 'java'
apply plugin: 'robovm'
apply from: '../publish.gradle'
configurations {
custom
compile.extendsFrom custom
}
eclipse {
project {
name = appName + "-ios"
}
}
dependencies {
compile project(':core')
compile "com.mobidevelop.robovm:robovm-rt:${roboVMVersion}"
compile "com.mobidevelop.robovm:robovm-cocoatouch:${roboVMVersion}"
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
}
}
project(":ios-moe") {
apply plugin: 'java'
apply plugin: 'moe'
apply from: '../publish.gradle'
configurations {
custom
compile.extendsFrom custom
natives
}
eclipse {
project {
name = appName + "-ios-moe"
}
}
dependencies {
compile project(':core')
compile "com.badlogicgames.gdx:gdx-backend-moe:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
}
}
编辑
在尝试IncludeFild时,我得到以下结果:
includebild(${rootProject.projectDir}/./html”)请尝试使用另一种方法使用
rootProject.projectDir
获取项目位置,然后添加。/html
,同样根据以下要求,无需包装到项目中,例如,仅使用includebild
:
includeBuild("${rootProject.projectDir}/../html")
另一个例子是可能很傻,但您是否尝试过以/
结尾:./html/
?一点也不傻。。但它一直没有用。请对标记更加小心-这个问题与项目管理无关。设置文件“/home/athenacadence/git/gdx complextext/example/Settings.gradle”行:2无法编译设置文件“/home/athenacadence/git/gdx complextext/example/Settings.gradle”。启动失败:设置文件“/home/athenacadence/git/gdx complextext/example/settings.gradle”:2:应为除“”\n“”以外的任何内容;在第2行第46列,我还是找到了。{rootProject.projectDir}/./')您使用什么版本?设置文件“/home/athenacadence/git/gdx complextext/example/Settings.gradle”行:2评估设置“example”时出现问题。在org.gradle.initialization.DefaultSettings.2.14.1类型的设置“example”上,找不到参数[/home/athenacadence/git/gdx complextextext/example/./html]的includeFild()方法。。。。在IncludeFild被添加后不久,我才意识到这一点。请看一下提供的答案链接,它看起来与您想要实现的类似。