Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/346.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 libGDX-构建失败#Android_Java_Android_Intellij Idea_Android Studio_Libgdx - Fatal编程技术网

Java libGDX-构建失败#Android

Java libGDX-构建失败#Android,java,android,intellij-idea,android-studio,libgdx,Java,Android,Intellij Idea,Android Studio,Libgdx,我对libGDX项目设置有问题。它仍在失败。。。 我也尝试过Android studio和Intellij Idea。 有来自控制台的报告: Generating app in C:\Users\Michal\AndroidStudioProjects\my-gdx-game Executing 'C:\Users\Michal\AndroidStudioProjects\my-gdx-game/gradlew.bat clean --no-daemon' To honour the JVM

我对libGDX项目设置有问题。它仍在失败。。。 我也尝试过Android studio和Intellij Idea。 有来自控制台的报告:

Generating app in C:\Users\Michal\AndroidStudioProjects\my-gdx-game
Executing 'C:\Users\Michal\AndroidStudioProjects\my-gdx-game/gradlew.bat 

clean --no-daemon'
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.2/userguide/gradle_daemon.html.
Configuration on demand is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'my-gdx-game'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:1.0.0.
     Required by:
         :my-gdx-game:unspecified
      > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.0.0/gradle-1.0.0.pom'.
         > peer not authenticated
      > Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/1.0.0/gradle-1.0.0.pom'.
         > peer not authenticated

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

BUILD FAILED

Total time: 52.686 secs
Done!
To import in Eclipse: File -> Import -> Gradle -> Gradle Project
To import to Intellij IDEA: File -> Open -> build.gradle
To import to NetBeans: File -> Open Project...!
我做错了什么

这是我的build.gradle脚本

buildscript {
    repositories {
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0'
    }
}

allprojects {
    apply plugin: "eclipse"
    apply plugin: "idea"

    version = '1.0'
    ext {
        appName = 'my-gdx-game'
        gdxVersion = '1.6.0'
        roboVMVersion = '1.2.0'
        box2DLightsVersion = '1.3'
        ashleyVersion = '1.4.0'
        aiVersion = '1.5.0'
    }

    repositories {
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    }
}

project(":android") {
    apply plugin: "android"

    configurations { natives }

    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
    }
}

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


    dependencies {
        compile "com.badlogicgames.gdx:gdx:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    }
}

tasks.eclipse.doLast {
    delete ".project"
}

这是导入失败还是安装失败?以下是屏幕截图: