尝试使用node建立cordova时出现此错误。我已经落后于代理,而且我已经做好了准备。这是截图。我错过了什么。
JAVA_HOME=C:\Program Files\java\jdk1.8.0_71
Running: C:\xampp\htdocs\MyApp\platforms\android\gradlew cdvBuildRelease
-b C:\xampp\htdocs\MyApp\platforms\android\build.gradle
-Dorg.gradle.daemon=true
Downloading http:// services. gradle. org/distributions/gradle-2.2.1-all.zip
Exception in thread "main" java.lang.RuntimeException:
java.io.IOException: Server returned HTTP response code: 503 for URL: http:// services.gradle. org/distributions/gradle-2.2.1-all.zip
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://services. gradle. org/distributions/gradle-2.2.1-all.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
at org.gradle.wrapper.Download.download(Download.java:45)
at org.gradle.wrapper.Install$1.call(Install.java:60)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
... 3 more C:\xampp\htdocs\MyApp\platforms\android\cordova\node_modules\q\q.js:126 throw e;
^ Error code 1 for command: cmd with args: /s /c "C:\xampp\htdocs\MyApp\platforms\android\gradlew cdvBuildRelease
-b C:\xampp\htdocs\MyApp\platforms\android\build.gradle
-Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1 You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
答案 0 :(得分:0)
找到解决方案。您可以选择1或2