离子应用程序构建错误

时间:2015-10-05 12:25:41

标签: android angularjs jvm ionic-framework ionic

我已经安装了运行和构建离子应用程序所需的一切,它一直运行到现在。突然间它开始出现所有类型的错误。我是离子发育的新手,所以不能理解这一点。甚至尝试了谷歌搜索,但直到现在都没有帮助。

我在尝试构建应用程序时遇到错误。它与本地浏览器中的serve命令完美配合。可能是什么问题?如果我需要更多细节,请告诉我。

C:\Users\Solution\reliableapp>ionic build android
Running command: "C:\Program Files (x86)\nodejs\node.exe" C:\Users\Solution\reli
ableapp\hooks\after_prepare\010_add_platform_class.js C:\Users\Solution\reliable
app
add to body class: platform-android
Running command: cmd "/s /c "C:\Users\Solution\reliableapp\platforms\android\cor
dova\build.bat""
ANDROID_HOME=C:\Users\Solution\AppData\Local\Android\android-sdk
JAVA_HOME=C:\Program Files (x86)\java\jdk1.7.0_71
Running: C:\Users\Solution\reliableapp\platforms\android\gradlew cdvBuildDebug -
b C:\Users\Solution\reliableapp\platforms\android\build.gradle -Dorg.gradle.daem
on=true
Downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip

Exception in thread "main" java.lang.RuntimeException: java.net.UnknownHostExcep
tion: downloads.gradle.org
        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.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.net.UnknownHostException: downloads.gradle.org
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
:178)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
        at sun.net.www.http.HttpClient.New(HttpClient.java:308)
        at sun.net.www.http.HttpClient.New(HttpClient.java:326)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:996)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:932)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:850)
        at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLCon
nection.java:2398)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1557)
        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(ExclusiveFileAcc
essManager.java:65)
        ... 3 more

C:\Users\Solution\reliableapp\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                    ^
Error code 1 for command: cmd with args: /s /c "C:\Users\Solution\reliableapp\pl
atforms\android\gradlew cdvBuildDebug -b C:\Users\Solution\reliableapp\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
    at ChildProcess.whenDone (C:\Users\Solution\AppData\Roaming\npm\node_modules
\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

C:\Users\Solution\reliableapp>ionic serve
Running live reload server: http://192.168.1.36:35729
Watching : [ 'www/**/*', '!www/lib/**/*' ]
Running dev server: http://192.168.1.36:8100
Ionic server commands, enter:
  restart or r to restart the client app from the root
  goto or g and a url to have the app navigate to the given url
  consolelogs or c to enable/disable console log output
  serverlogs or s to enable/disable server log output
  quit or q to shutdown the server and exit

ionic $ q

0 个答案:

没有答案