Android Studio - Ошибка сборки Gradle: "Отказ в соединении с http://127.0.0.1:8080"
Я занимаюсь разработкой игры в Android Studio и недавно перешел на новую машину после того, как старая избавилась от призрака. У меня свежая установка Android Studio 2.2.2. Когда начинается процесс сборки gradle, он завершается неудачей на этапе "разрешения зависимостей". Заходя в журнал Gradle Build, я вижу, что соединение с localhost отклоняется: "Отказано в соединении с http://127.0.0.1:8080/ "
Мой файл build.gradle выглядит так:
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.1.0'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = "Game Name"
gdxVersion = '1.9.3'
roboVMVersion = '2.1.0'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.0'
aiVersion = '1.8.0'
}
repositories {
mavenLocal()
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-box2d-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
}
}
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-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
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-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64"
compile "com.badlogicgames.box2dlights:box2dlights:$box2DLightsVersion"
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-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
}
}
project(":ios") {
apply plugin: "java"
apply plugin: "robovm"
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"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios"
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
compile "com.badlogicgames.box2dlights:box2dlights:$box2DLightsVersion"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
}
}
tasks.eclipse.doLast {
delete ".project"
}
Журнал сборки Gradle находится ниже. Для каждой из зависимостей, которые пытается решить gradle, я получаю один и тот же сбой (то есть каждый сбой при подключении к localhost).
Error:A problem occurred configuring root project 'GameName'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve de.richsource.gradle.plugins:gwt-gradle-plugin:0.6.
Required by:
:GameName:unspecified
> Could not resolve de.richsource.gradle.plugins:gwt-gradle-plugin:0.6.
> Could not get resource 'https://repo1.maven.org/maven2/de/richsource/gradle/plugins/gwt-gradle-plugin/0.6/gwt-gradle-plugin-0.6.pom'.
> Could not GET 'https://repo1.maven.org/maven2/de/richsource/gradle/plugins/gwt-gradle-plugin/0.6/gwt-gradle-plugin-0.6.pom'.
> Connection to http://127.0.0.1:8080 refused
> Could not resolve de.richsource.gradle.plugins:gwt-gradle-plugin:0.6.
> Could not get resource 'https://oss.sonatype.org/content/repositories/snapshots/de/richsource/gradle/plugins/gwt-gradle-plugin/0.6/gwt-gradle-plugin-0.6.pom'.
> Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/de/richsource/gradle/plugins/gwt-gradle-plugin/0.6/gwt-gradle-plugin-0.6.pom'.
> Connection to http://127.0.0.1:8080 refused
> Could not resolve de.richsource.gradle.plugins:gwt-gradle-plugin:0.6.
> Could not get resource 'https://jcenter.bintray.com/de/richsource/gradle/plugins/gwt-gradle-plugin/0.6/gwt-gradle-plugin-0.6.pom'.
> Could not GET 'https://jcenter.bintray.com/de/richsource/gradle/plugins/gwt-gradle-plugin/0.6/gwt-gradle-plugin-0.6.pom'.
> Connection to http://127.0.0.1:8080 refused
> Could not resolve com.android.tools.build:gradle:2.1.2.
Required by:
:GameName:unspecified
> Could not resolve com.android.tools.build:gradle:2.1.2.
> Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.2/gradle-2.1.2.pom'.
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.2/gradle-2.1.2.pom'.
> Connection to http://127.0.0.1:8080 refused
> Could not resolve com.android.tools.build:gradle:2.1.2.
> Could not get resource 'https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/2.1.2/gradle-2.1.2.pom'.
> Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/2.1.2/gradle-2.1.2.pom'.
> Connection to http://127.0.0.1:8080 refused
> Could not resolve com.android.tools.build:gradle:2.1.2.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.2/gradle-2.1.2.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.2/gradle-2.1.2.pom'.
> Connection to http://127.0.0.1:8080 refused
> Could not resolve com.mobidevelop.robovm:robovm-gradle-plugin:2.1.0.
Required by:
:GameName:unspecified
> Could not resolve com.mobidevelop.robovm:robovm-gradle-plugin:2.1.0.
> Could not get resource 'https://repo1.maven.org/maven2/com/mobidevelop/robovm/robovm-gradle-plugin/2.1.0/robovm-gradle-plugin-2.1.0.pom'.
> Could not GET 'https://repo1.maven.org/maven2/com/mobidevelop/robovm/robovm-gradle-plugin/2.1.0/robovm-gradle-plugin-2.1.0.pom'.
> Connection to http://127.0.0.1:8080 refused
> Could not resolve com.mobidevelop.robovm:robovm-gradle-plugin:2.1.0.
> Could not get resource 'https://oss.sonatype.org/content/repositories/snapshots/com/mobidevelop/robovm/robovm-gradle-plugin/2.1.0/robovm-gradle-plugin-2.1.0.pom'.
> Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/com/mobidevelop/robovm/robovm-gradle-plugin/2.1.0/robovm-gradle-plugin-2.1.0.pom'.
> Connection to http://127.0.0.1:8080 refused
> Could not resolve com.mobidevelop.robovm:robovm-gradle-plugin:2.1.0.
> Could not get resource 'https://jcenter.bintray.com/com/mobidevelop/robovm/robovm-gradle-plugin/2.1.0/robovm-gradle-plugin-2.1.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/mobidevelop/robovm/robovm-gradle-plugin/2.1.0/robovm-gradle-plugin-2.1.0.pom'.
> Connection to http://127.0.0.1:8080 refused
Я был бы очень признателен за любую помощь, так как я застрял на этом некоторое время. Пожалуйста, дайте мне знать, будет ли полезна любая другая информация.
Заранее спасибо,
Том