簡體   English   中英

錯誤:命令 gradlew.bat 失敗,退出代碼為 1

[英]Error: Command gradlew.bat failed with exit code 1

我正在運行我的 nativescript android 設備,但出現以下錯誤。 我不知道該怎么辦,我搜索了,查看了stackoverflow,但我的情況似乎有點不同? 我在命令提示符下使用 Windows 10。 模擬器是 Pixel 4 API 30。

Searching for devices...
Preparing project...
webpack is watching the files...
asset vendor.js 16 MiB [compared for emit] (name: vendor) (id hint: defaultVendor)
asset bundle.js 361 KiB [compared for emit] (name: bundle)
asset runtime.js 88.6 KiB [compared for emit] (name: runtime)
Entrypoint bundle 16.4 MiB = runtime.js 88.6 KiB vendor.js 16 MiB bundle.js 361 KiB
runtime modules 25.4 KiB 13 modules
orphan modules 576 bytes [orphan] 7 modules
modules by path ./node_modules/ 5.4 MiB
  javascript modules 5.13 MiB 561 modules
  json modules 273 KiB
    modules by path ./node_modules/mdn-data/css/*.json 242 KiB 3 modules
    modules by path ./node_modules/css-tree/ 30.7 KiB 2 modules
modules by path ./src/ 128 KiB
  modules by path ./src/app/ 6.72 KiB 6 modules
  modules by path ./src/*.ts 4.2 KiB
    ./src/polyfills.ts 561 bytes [built] [code generated]
    ./src/main.ts 3.65 KiB [built] [code generated]
  ./src/app.css 117 KiB [built] [code generated]
external "~/package.json" 42 bytes [optional] [built] [code generated]
webpack 5.74.0 compiled successfully in 330708 ms
Webpack compilation complete. Watching for file changes.
File change detected. Starting incremental webpack compilation...
assets by status 16.4 MiB [cached] 3 assets
Entrypoint bundle 16.4 MiB = runtime.js 88.6 KiB vendor.js 16 MiB bundle.js 361 KiB
cached modules 5.52 MiB (javascript) 25.4 KiB (runtime) [cached] 596 modules
webpack 5.74.0 compiled successfully in 8003 ms
Webpack compilation complete. Watching for file changes.
Downloading https://services.gradle.org/distributions/gradle-7.4-bin.zip

Exception in thread "main" java.net.UnknownHostException: services.gradle.org
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:60)
        at org.gradle.wrapper.Download.download(Download.java:45)
        at org.gradle.wrapper.Install$1.call(Install.java:62)
        at org.gradle.wrapper.Install$1.call(Install.java:48)
        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
        at org.gradle.wrapper.Install.createDist(Install.java:48)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Failed to build plugin @nativescript/core :
Error: Command gradlew.bat failed with exit code 1

問題在於此域services.gradle.org的 DNS 服務/記錄。

因為它無法從https://services.gradle.org/distributions/gradle-7.4-bin.zip下載文件

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM