首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不能用gradle建造

不能用gradle建造
EN

Stack Overflow用户
提问于 2016-06-23 10:40:20
回答 1查看 417关注 0票数 2

这个错误信息是什么意思?

代码语言:javascript
复制
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not find com.jme3:xmlpull-xpp3:3.0.0.20140325-SNAPSHOT.
  Searched in the following locations:
      https://jcenter.bintray.com/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/maven-metadata.xml
      https://jcenter.bintray.com/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.pom
      https://jcenter.bintray.com/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.jar
      https://repo1.maven.org/maven2/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/maven-metadata.xml
      https://repo1.maven.org/maven2/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.pom
      https://repo1.maven.org/maven2/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.jar
      https://mvnrepository.com/artifact/cz.advel.jbullet/jbullet/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/maven-metadata.xml
      https://mvnrepository.com/artifact/cz.advel.jbullet/jbullet/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.pom
      https://mvnrepository.com/artifact/cz.advel.jbullet/jbullet/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.jar
      https://mvnrepository.com/artifact/org.cogchar/ext.bundle.opengl.jmonkey/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/maven-metadata.xml
      https://mvnrepository.com/artifact/org.cogchar/ext.bundle.opengl.jmonkey/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.pom
      https://mvnrepository.com/artifact/org.cogchar/ext.bundle.opengl.jmonkey/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.jar
  Required by:
      :spaceworld:unspecified > org.cogchar:ext.bundle.opengl.jmonkey:1.1.3

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

我的build.gradle

代码语言:javascript
复制
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'eclipse'
apply plugin: 'idea'

mainClassName = 'spaceworld.SpaceUFO'

repositories {
    jcenter()
}

ext.jmeVersion = "[3.1,)"

project(":assets") {
    apply plugin: "java"

    buildDir = rootProject.file("build/assets")

    sourceSets {
        main {
            resources {
                srcDir '.'
            }
        }
    }
}
repositories {
    mavenCentral()
    maven {
        url "https://mvnrepository.com/artifact/cz.advel.jbullet/jbullet"

    }
    maven {

        url "https://mvnrepository.com/artifact/org.cogchar/ext.bundle.opengl.jmonkey"

    }
}



dependencies {

    compile "org.jmonkeyengine:jme3-core:$jmeVersion"
    compile "org.jmonkeyengine:jme3-desktop:$jmeVersion"
    compile "org.jmonkeyengine:jme3-lwjgl:$jmeVersion"
    compile "org.jmonkeyengine:jme3-blender:$jmeVersion"
    compile "org.jmonkeyengine:jme3-bullet:$jmeVersion"
    compile "org.jmonkeyengine:jme3-plugins:$jmeVersion"
    compile "org.jmonkeyengine:jme3-networking:$jmeVersion"

    compile group: "cz.advel.jbullet", name: "jbullet", version: "20101010"

    compile group: "org.cogchar", name: "ext.bundle.opengl.jmonkey", version: "1.1.3"

    compile files('libs/cai-nmgen-0.2.0.jar')

    runtime project(':assets')
}

task wrapper(type: Wrapper) {
}

task createDirs << {

    def pkg = 'spaceworld'
    def dirs = [
            file("./src/main/java/$pkg"),
            file("./src/main/resources"),
            file("./assets/Interface"),
            file("./assets/MatDefs"),
            file("./assets/Materials"),
            file("./assets/Models"),
            file("./assets/Scenes"),
            file("./assets/Shaders"),
            file("./assets/Sounds"),
            file("./assets/Textures"),
    ]

    dirs.each {
        if (!it.exists()) {
            println "Creating " + it
            it.mkdirs()
        }
        if (it.listFiles().length == 0) {
            def stub = new File(it, 'removeme.txt')
            println "Creating stub file to allow git checkin, file:$stub"
            stub.text = "Remove me when there are files here."
        }
    }
}

我不知道如何添加依赖项。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-23 10:54:25

这意味着您指定的存储库中不存在依赖com.jme3:xmlpull-xpp3:3.0.0.20140325-SNAPSHOT

可能的原因:

  • 你拼错了依赖性。
  • 你漏掉了一个仓库。
  • 本地Maven存储库或gradle缓存被破坏。

考虑查看依赖树,以确定这种依赖来自何处,以及如何解决该问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37989287

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档