ionic run android 出错
发布于 2个月前 作者 jiqiang888 376 次浏览 来自 问答

我在建立了ionic工程,并添加了android之后,使用ionic run android,结果报错,哪位大侠有遇到过类似的问题吗?求解决!!! 错误信息如下: D:\angular2-study\Ionic2-IonicClub>ionic run android WARN: ionic.config.js has been deprecated, you can remove it.

Running ‘run:before’ gulp task before run [15:37:16] Starting 'clean’… [15:37:16] Finished ‘clean’ after 57 ms [15:37:16] Starting 'build’… [15:37:16] Starting 'sass’… [15:37:16] Starting 'html’… [15:37:16] Starting 'fonts’… [15:37:16] Starting 'scripts’… [15:37:16] Finished ‘scripts’ after 71 ms [15:37:16] Finished ‘html’ after 100 ms [15:37:16] Finished ‘fonts’ after 103 ms [15:37:17] Finished ‘sass’ after 1.34 s [15:37:35] Finished ‘build’ after 19 s [15:37:35] Starting 'run:before’… [15:37:35] Finished ‘run:before’ after 11 μs

Running command: “C:\Program Files\nodejs\node.exe” D:\angular2-study\Ionic2-Ion icClub\hooks\after_prepare\010_add_platform_class.js D:\angular2-study\Ionic2-Io nicClub add to body class: platform-android Discovered plugin “cordova-plugin-splashscreen” in config.xml. Adding it to the project Fetching plugin “cordova-plugin-splashscreen@^3.2.3-dev” via npm Failed to restore plugin “cordova-plugin-splashscreen” from config.xml. You migh t need to try adding it again. Error: Failed to fetch plugin cordova-plugin-spla shscreen@^3.2.3-dev via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Error: No compatible version found: cordova-plugin-splashscreen@’>=3.2.3-dev <4. 0.0’ Valid install targets: [“0.2.0","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.3.0","0.3.1","0.3.2” ,"0.3.3","0.3.4","0.3.5","1.0.0","2.0.0","2.1.0","3.0.0","3.1.0","3.2.0","3.2.1" ,"3.2.2","4.0.0"] ANDROID_HOME=C:\Users\jiqiangz\AppData\Local\Android\sdk JAVA_HOME=C:\Program Files\java\jdk1.7.0_67 No target specified, deploying to device '71MBBLL22DDD’. Downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip Exception in thread “main” java.lang.RuntimeException: java.net.ConnectException : Connection timed out: connect 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.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketI mpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja va:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket Impl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java :182) 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.getInputStream(HttpURLCon nection.java:1300) 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 Error: Error code 1 for command: cmd with args: /s,/c,"D:\angular2-study\Ionic2- IonicClub\platforms\android\gradlew cdvBuildDebug -b D:\angular2-study\Ionic2-Io nicClub\platforms\android\build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=tr ue -Pandroid.useDeprecatedNdk=true"

回到顶部