maven - Gradle下载repo1.maven.org卡住了

标签 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上运行正常。

最佳答案

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

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

关于maven - Gradle下载repo1.maven.org卡住了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42333779/

相关文章:

linux - 如何将 Maven 安装到 Red Hat Enterprise Linux 6 中?

maven - Jenkins CI : Where and how store configuration files?

java - proguard:无法读取 [C:\Program Files\AdoptOpenJDK\jdk-11.0.6.10-hotspot\lib\rt.jar]

安卓工作室 : Drawable xml preview not working

java - 未找到类 Android 支持设计 Widget NavigationView

Android Studio 频繁崩溃无报错

validation - SONARQUBE - 项目验证失败,%project 已经是项目的一部分

android - 支持库版本问题

java - 仅当执行 jar 文件时,REST 客户端中出现 ClientHandlerException

android - 在 com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@5635bcd2 上找不到属性 'packageApplication'