Gradle下载repo1.maven.org卡住了

时间:2017-02-19 22:40:47

标签: maven android-studio gradle gwt vmware

我在Windows PC上运行OS X El Capitan 10.11.6 VM(VMware)。到目前为止,一切都运行良好,但是现在我尝试同步我的项目,它一直卡在Gradle: Download https://repo1.maven.org/maven2/com/google/gwt/gwt-user/2.6.1/gwt-user-2.6.1.jar

它在此之前很快就会下载其他一些Gradle依赖项,所以不确定这里的问题是什么。我的Gradle.build:

buildscript {
    repositories {
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        jcenter()
    }
    dependencies {
        classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath 'org.robovm:robovm-gradle-plugin:1.12.0'
    }
}

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

    version = '1.0'
    ext {
        appName = "SpaceFriends"
        gdxVersion = '1.9.2'
        roboVMVersion = '1.12.0'
        box2DLightsVersion = '1.4'
        ashleyVersion = '1.7.0'
        aiVersion = '1.8.0'
        gdxPayVersion = '0.10.3'
        gdxFacebookVersion = '1.2.2'
    }

    repositories {
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    }
}
project(":desktop") {
    apply plugin: "java"

    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
        compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
        compile "de.tomgrill.gdxfacebook:gdx-facebook-desktop:$gdxFacebookVersion"
    }
}
project(":android") {
    apply plugin: "android"

    android {
        compileSdkVersion 23
        buildToolsVersion '23.0.1'
    }

    configurations { natives }

    dependencies {
        compile project(":core")
        compile fileTree(dir: '../core/libs', include: '*.jar')
        compile('com.android.support:cardview-v7:23.2.0') {
            force = true
        }
        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-freetype:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
        compile "de.tomgrill.gdxfacebook:gdx-facebook-android:$gdxFacebookVersion"
        compile "com.badlogicgames.gdxpay:gdx-pay-android:$gdxPayVersion"
        compile "com.badlogicgames.gdxpay:gdx-pay-android-googleplay:${gdxPayVersion}@aar"
    }
}
project(":ios") {
    apply plugin: "java"
    apply plugin: "robovm"


    dependencies {
        compile project(":core")
        compile "org.robovm:robovm-rt:$roboVMVersion"
        compile "org.robovm:robovm-cocoatouch:$roboVMVersion"
        compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
        compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
        compile "de.tomgrill.gdxfacebook:gdx-facebook-ios:$gdxFacebookVersion"
        compile "com.badlogicgames.gdxpay:gdx-pay-iosrobovm-apple:$gdxPayVersion"
    }
}
project(":html") {
    apply plugin: "gwt"
    apply plugin: "war"


    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
        compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
        compile "de.tomgrill.gdxfacebook:gdx-facebook-html:$gdxFacebookVersion"
    }
}
project(":core") {
    apply plugin: "java"


    dependencies {
        compile "com.badlogicgames.gdx:gdx:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
        compile "de.tomgrill.gdxfacebook:gdx-facebook-core:$gdxFacebookVersion"
        compile "com.badlogicgames.gdxpay:gdx-pay-client:$gdxPayVersion"
        compile fileTree(dir: "libs", include: "*.jar")
    }
}
tasks.eclipse.doLast {
    delete ".project"
}

我下载了该文件并可以在本地链接到该文件,但不确定如何,即我不确定我的gradle中的内容是否提示此下载(?)

修改:正在运行/gradlew clean也会从services.gradle.org开始下载,但永远不会完成。

Edit2:值得一提的是我的Gradle.build在运行相同项目的PC上工作得很好。

1 个答案:

答案 0 :(得分:0)

此问题特定于在VMware上运行的操作系统。

遇到此问题的任何人,或者只是无法从终端连接和下载内容的一般问题,请将您的网络适配器从NAT更改为桥接。