我是离子编程的新手,所以我需要你们的建议......
我尝试将平台添加到我的项目中,所以我尝试:
离子平台添加android
并且平台已成功添加...
之后,我尝试将我的项目构建到andorid平台,我尝试:
离子构建 - 释放android
但是,当我尝试在我的命令提示符中运行它时,我收到错误消息:
Running command: cmd "/s /c ""D:\My Project\IONIC APPS\New Project\platforms\and
roid\cordova\build.bat" --release""
ANDROID_HOME=D:\Android\Eclipse\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_51
Running: D:\My Project\IONIC APPS\New Project\platforms\android\gradlew cdvBuild
Release -b D:\My Project\IONIC APPS\New Project\platforms\android\build.gradle -
Dorg.gradle.daemon=true
Unzipping C:\Users\ace\.gradle\wrapper\dists\gradle-2.2.1-all\2m8005s69iu8v0oiej
fej094b\gradle-2.2.1-all.zip to C:\Users\ace\.gradle\wrapper\dists\gradle-2.2.1-
all\2m8005s69iu8v0oiejfej094b
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipExceptio
n: error in opening zip file
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.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:220)
at java.util.zip.ZipFile.<init>(ZipFile.java:150)
at java.util.zip.ZipFile.<init>(ZipFile.java:164)
at org.gradle.wrapper.Install.unzip(Install.java:160)
at org.gradle.wrapper.Install.access$400(Install.java:29)
at org.gradle.wrapper.Install$1.call(Install.java:70)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:65)
... 3 more
D:\My Project\IONIC APPS\New Project\platforms\android\cordova\node_modules\q\q.
js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c ""D:\My Project\IONIC APPS\New Pr
oject\platforms\android\gradlew" cdvBuildRelease -b "D:\My Project\IONIC APPS\Ne
w Project\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
你能帮我解决这个问题吗?所以我可以成功构建和发布我的项目...... 我的机器是Windows 8,离子版本1.7.11,npm版本2.11.3,以及java规范:
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) Client VM (build 25.51-b03, mixed mode)