2017-12-27 339 views
0

錯誤與gradle,使用膠子移動。錯誤與gradle,使用膠子移動

大家好。

我測試Eclipse中的膠子移動插件,這是正常的工作,但是,經過嘗試添加的依賴,我遇到了以下錯誤:

FAILURE: Build failed with an exception. 

* What went wrong: 
Could not resolve all files for configuration ':AppTesteApp:compileClasspath'. 
> Could not download charm.jar (com.gluonhq:charm:4.4.1) 
    > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/4.4.1/charm-4.4.1.jar'. 
     > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/4.4.1/charm-4.4.1.jar'. Received status code 503 from server: Service Unavailable 
> Could not download glisten-afterburner.jar (com.gluonhq:glisten-afterburner:1.2.1) 
    > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/glisten-afterburner/1.2.1/glisten-afterburner-1.2.1.jar'. 
     > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/glisten-afterburner/1.2.1/glisten-afterburner-1.2.1.jar'. Received status code 503 from server: Service Unavailable 
> Could not download charm-glisten-connect-view.jar (com.gluonhq:charm-glisten-connect-view:4.4.1) 
    > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten-connect-view/4.4.1/charm-glisten-connect-view-4.4.1.jar'. 
     > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten-connect-view/4.4.1/charm-glisten-connect-view-4.4.1.jar'. Received status code 503 from server: Service Unavailable 
> Could not download charm-glisten.jar (com.gluonhq:charm-glisten:4.4.1) 
    > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten/4.4.1/charm-glisten-4.4.1.jar'. 
     > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten/4.4.1/charm-glisten-4.4.1.jar'. Received status code 503 from server: Service Unavailable 
> Could not download charm-cloudlink-client.jar (com.gluonhq:charm-cloudlink-client:4.4.4) 
    > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-cloudlink-client/4.4.4/charm-cloudlink-client-4.4.4.jar'. 
     > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-cloudlink-client/4.4.4/charm-cloudlink-client-4.4.4.jar'. Received status code 503 from server: Service Unavailable 

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

我改變IDE嘗試一樣,我遇到了同樣的錯誤,在此之後,它不會運行。

有人遇到這個錯誤,並糾正?任何光線?

我使用InteliJ IDE和eclipse與JDK 1.8上的Fedora 26上運行,gradle這個4

我的build.gradle:

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'org.javafxports:jfxmobile-plugin:1.3.10' 
    } 
} 

apply plugin: 'org.javafxports.jfxmobile' 

repositories { 
    jcenter() 
    maven { 
     url 'http://nexus.gluonhq.com/nexus/content/repositories/releases' 
    } 
} 

mainClassName = 'com.gluonapplication.GluonApplication' 

dependencies { 
    compile 'com.gluonhq:charm:4.4.1' 
} 

jfxmobile { 
    downConfig { 
     version = '3.6.0' 
     // Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead 
     plugins 'display', 'lifecycle', 'statusbar', 'storage' 
    } 
    android { 
     manifest = 'src/android/AndroidManifest.xml' 
    } 
    ios { 
     infoPList = file('src/ios/Default-Info.plist') 
     forceLinkClasses = [ 
       'com.gluonhq.**.*', 
       'javax.annotations.**.*', 
       'javax.inject.**.*', 
       'javax.json.**.*', 
       'org.glassfish.json.**.*' 
     ] 
    } 
} 

控制檯錯誤:

12:26:52: Executing task 'build'... 

:assemble UP-TO-DATE 
:check UP-TO-DATE 
:build UP-TO-DATE 
:GluonMobile-MultiViewProjectApp:compileJava FAILED 

FAILURE: Build failed with an exception. 

* What went wrong: 
Could not resolve all files for configuration ':GluonMobile-MultiViewProjectApp:compileClasspath'. 
> Could not download charm.jar (com.gluonhq:charm:4.4.1) 
    > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/4.4.1/charm-4.4.1.jar'. 
     > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/4.4.1/charm-4.4.1.jar'. Received status code 503 from server: Service Unavailable 
> Could not download charm-glisten-connect-view.jar (com.gluonhq:charm-glisten-connect-view:4.4.1) 
    > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten-connect-view/4.4.1/charm-glisten-connect-view-4.4.1.jar'. 
     > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten-connect-view/4.4.1/charm-glisten-connect-view-4.4.1.jar'. Received status code 503 from server: Service Unavailable 
> Could not download charm-glisten.jar (com.gluonhq:charm-glisten:4.4.1) 
    > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten/4.4.1/charm-glisten-4.4.1.jar'. 
     > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten/4.4.1/charm-glisten-4.4.1.jar'. Received status code 503 from server: Service Unavailable 
> Could not download charm-cloudlink-client.jar (com.gluonhq:charm-cloudlink-client:4.4.4) 
    > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-cloudlink-client/4.4.4/charm-cloudlink-client-4.4.4.jar'. 
     > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-cloudlink-client/4.4.4/charm-cloudlink-client-4.4.4.jar'. Received status code 503 from server: Service Unavailable 

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

* Get more help at https://help.gradle.org 

BUILD FAILED in 4s 
1 actionable task: 1 executed 
Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/4.4.1/charm-4.4.1.jar'. Received status code 503 from server: Service Unavailable 
12:26:56: Task execution finished 'build'. 

enter image description here

enter image description here

+0

發佈您的'build.gradle'文件。錯誤「從服務器收到狀態碼503:服務不可用」可能意味着nexus服務器已關閉,但現在它適用於我。你能再次檢查嗎? –

+0

您好何= d我的build.gradle'buildscript { 依賴性{ 類路徑 'org.javafxports:jfxmobile-插件:1.1.0' } } 庫{ jcenter() 行家{ URL的「http:/ /nexus.gluonhq.com/nexus/content/repositories/releases' } } 依賴性{ 編譯 'com.gluonhq:魅力:4.0.0' } jfxmobile { downConfig { 版本=「3.0.0 ' plugins'display','lifecycle','statusbar','storage' } android:{ manifest ='src/android/AndroidManifest.xml' } } ' –

+0

我看到你回答了這個問題,並且改變了我的gradle,但是錯誤依然存在。 [https://stackoverflow.com/questions/41519348/gluon-4-x-x-artifacts-not-in-the-nexus-repo?rq=1] –

回答

0

錯誤已解決,我下載了Gradle IdePack 3.8.x + 1.0.x plugin併成功執行。我非常感謝所有的支持。

+0

如果你在你提到的問題中選擇了一個[answer](https://stackoverflow.com/a/47457354/3956070),那麼就有一個新的插件版本,所以你只需要更新你當前的插件。 –

+0

@JoséPereda,你知道如何添加像firebase這樣的依賴嗎?我試圖使用API​​,但不寫下我的庫。 –

+0

請創建一個新問題。 –