编译不成功,可能是Android SDK的问题,使用代理,把最新的SDK更新,全点上去下载,我之前也试过这种情况,把Android 6.0的sdk全下了就可以了 |
我也遇到这样问题,怎么解的 |
本帖最后由 weiweicat333 于 2016-3-17 16:47 编辑 随风飘 发表于 2016-3-17 16:35 您好,非常感谢您的回帖,我查看了一下,我这个插件只有cordova-plugin-whitelist 1.2.1 "Whitelist",删除了这个插件之后,在编译的时候,还会出现Error: Error code 1 for command: cmd with args: /s,/c,"D:\hello\platforms\android\gradlew cdvBuildDebug -b D:\hello\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"这个错误。不知道哪里出现了问题。 D:\hello>cordova plugin ls cordova-plugin-whitelist 1.2.1 "Whitelist" D:\hello>cordova plugin rm cordova-plugin-whitelist Uninstalling cordova-plugin-whitelist from android Uninstalling cordova-plugin-whitelist from browser Removing "cordova-plugin-whitelist" D:\hello>cordova build android Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project Fetching plugin "cordova-plugin-whitelist@1" via npm Installing "cordova-plugin-whitelist" for android This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in. Installing "cordova-plugin-whitelist" for browser ANDROID_HOME=D:\adt-bundle-windows-x86-20130917\sdk JAVA_HOME=C:\Program Files\Java\jdk1.8.0_73 Downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Error writing to server 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: Error writing to server at sun.net.www.protocol.http.HttpURLConnection.writeRequests(HttpURLConnection.java:666) at sun.net.www.protocol.http.HttpURLConnection.writeRequests(HttpURLConnection.java:678) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1534) 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 ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,"D:\hello\platforms\android\gradlew cdvBuildDebug -b D:\hello\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true" You may not have the required environment or OS to build this project Error: Error code 1 for command: cmd with args: /s,/c,"D:\hello\platforms\android\gradlew cdvBuildDebug -b D:\hello\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true" D:\hello>cordova platform ls Installed platforms: android 5.1.1, browser 4.0.0 Available platforms: amazon-fireos, blackberry10, firefoxos, webos, windows, windows8, wp8 D:\hello>cordova platform rm browser D:\hello>cordova platform ls Installed platforms: android 5.1.1 Available platforms: amazon-fireos, blackberry10, browser, firefoxos, webos, windows, windows8, wp8 |
是不是项目那里安装了不能使用的插件,把部分插件卸了试下? |
Archiver|手机版|小黑屋| PhoneGap中文网 ( 京ICP备13027796号-1 )
GMT+8, 2024-11-6 03:37 , Processed in 0.067071 second(s), 37 queries .
Powered by Discuz! X3.2
© 2001-2013 Comsenz Inc.