2014-10-12 8 views
8

Próbuję skonfigurować libgdx z Eclipse przy użyciu tej tutorial
ale gdy próbuję zbudować projekt mam ten błąd
błąd Gradle podczas konfigurowania libgdx z zaćmienia

Configuration on demand is an incubating feature. 

FAILURE: Build failed with an exception. 

* What went wrong: 
A problem occurred configuring root project 'TestGame'. 
> Could not resolve all dependencies for configuration ':classpath'. 
    > Could not resolve de.richsource.gradle.plugins:gwt-gradle-plugin:0.5. 
    Required by: 
     :TestGame:unspecified 
     > Could not GET 'https://repo1.maven.org/maven2/de/richsource/gradle/plugins/gwt-gradle-plugin 
/0.5/gwt-gradle-plugin-0.5.pom'. 
     > Connection to https://repo1.maven.org refused 
     > Could not GET 'https://jcenter.bintray.com/de/richsource/gradle/plugins/gwt-gradle-plugin/0. 
5/gwt-gradle-plugin-0.5.pom'. 
     > Connection to https://jcenter.bintray.com refused 
    > Could not resolve com.android.tools.build:gradle:0.13+. 
    Required by: 
     :TestGame:unspecified 
     > Failed to list versions for com.android.tools.build:gradle. 
     > Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/android/tools/buil 
d/gradle/maven-metadata.xml. 
      > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-met 
adata.xml'. 
       > Connection to https://repo1.maven.org refused 
     > Failed to list versions for com.android.tools.build:gradle. 
     > Unable to load Maven meta-data from https://jcenter.bintray.com/com/android/tools/build/g 
radle/maven-metadata.xml. 
      > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metada 
ta.xml'. 
       > Connection to https://jcenter.bintray.com refused 
    > Could not resolve org.robovm:robovm-gradle-plugin:1.0.0-alpha-04. 
    Required by: 
     :TestGame:unspecified 
     > Could not GET 'https://repo1.maven.org/maven2/org/robovm/robovm-gradle-plugin/1.0.0-alpha-04 
/robovm-gradle-plugin-1.0.0-alpha-04.pom'. 
     > Connection to https://repo1.maven.org refused 
     > Could not GET 'https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.0.0-alpha-04/ro 
bovm-gradle-plugin-1.0.0-alpha-04.pom'. 
     > Connection to https://jcenter.bintray.com refused 

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

BUILD FAILED 

Total time: 2 mins 12.602 secs 

a ui libgdx wygenerowany ten build Gradle plik

buildscript { 
    repositories { 
     mavenCentral() 
     jcenter() 
    } 
    dependencies { 
     classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.5' 
     classpath 'com.android.tools.build:gradle:0.13+' 
     classpath 'org.robovm:robovm-gradle-plugin:1.0.0-alpha-04' 
    } 
} 

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

    version = '1.0' 
    ext { 
     appName = 'TestingGame' 
     gdxVersion = '1.4.1' 
     roboVMVersion = '1.0.0-alpha-04' 
    } 

    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-box2d-platform:$gdxVersion:natives-desktop" 
    } 
} 

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" 
     compile "com.badlogicgames.box2dlights:box2dlights:1.2" 
    } 
} 

project(":ios") { 
    apply plugin: "java" 
    apply plugin: "robovm" 

    configurations { natives } 

    dependencies { 
     compile project(":core") 
     compile "org.robovm:robovm-rt:${roboVMVersion}" 
     compile "org.robovm:robovm-cocoatouch:${roboVMVersion}" 
     compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" 
     natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" 
     natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios" 
    } 
} 

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 "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources" 
     compile "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources" 
     compile "com.badlogicgames.box2dlights:box2dlights:1.2:sources" 
    } 
} 

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


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

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

i Know maven ale nie wiem Gradle więc nie mogę zrozumieć wyjątek i gdzie mam pójść źle nawet zrobiłem wszystko w tutorialu, każda pomoc proszę?

+0

Losowy pomysł, ale spróbuj użyć 'com.android.tools.build: gradle: 0.12 +' zamiast '0.13 +'. Upewnij się również, że żaden firewall nie uniemożliwia komunikacji Gradle z repozytoriami (inny losowy pomysł). – EpicPandaForce

+0

@Zhuinden dzięki za odpowiedź, po prostu spróbuj tego samego błędu –

+0

Czy masz zaporę ogniową, serwer proxy itp? – Opal

Odpowiedz

0

Po wielu poszukiwania i stwierdził, że muszę dodać GWT że pobrane do wtyczki Eclipse i która nie została wymieniona w tutorialu

więc co zrobiłem jest

in eclipse go to WINDOWS --->PREFERENCE--->GOOGLE ---->WEB TOOLKIT --->add and search for the folder you have extracted its ZIP file 
0

Miałem podobny problem z Gradle (Nie mogłem pobrać "https ...), ale z innym projektem. Jestem za firewallem, a także

Próbowałem przy użyciu oddzielnego gradle.properties a także próbował minięciu serwera/portu proxy Gradle poprzez argumenty VM, jak wspomniano przez niektórych innych stanowisk na SO, ale żadna z tych pracował

Oto sposób znalazłem poprzez ustawienia Eclipse, które pracowały dla mnie

Pod Okno-> Preferencje-> Połączenia sieciowe uaktywnianie usługodawcę ręcznym

settings

.

Następnie edytuj wpisy dla HTTP i HTTPS i dodaj tam serwer proxy i port. Jeśli twój serwer proxy wymaga twoich danych, upewnij się, że je również dodasz. Spróbuj zbudować go ponownie i mam nadzieję, że działa tym razem

Powiązane problemy