离子构建android错误

离子构建android错误

本文介绍了离子构建android错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很困惑。 jdk,sdk,ant,cordova,ionic做得好,为什么会造成错误?

我到处搜索,但没有回答。

我猜错误版本?
谁可以帮助这个?

系统:win8

jdk:1.8

ant:1.96

android:22

I'm confused. jdk,sdk,ant,cordova,ionic doing well,why builds error?
I searched everywhere,but no answer for it.
I guess has a error version?
who can help this?

system:win8
jdk:1.8
ant:1.96
android:22

%ANT_HOME%\bin\;%ANDROID_HOME%\platform-tools\;%ANDROID_HOME%\tools\;%java_home%\bin;%java_home%\jre\bin;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\

路径

E:\ionic\demo22>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" E:\ionic\demo22\hooks\after_
prepare\010_add_platform_class.js E:\ionic\demo22
add to body class: platform-android
Running command: cmd "/s /c "E:\ionic\demo22\platforms\android\cordova\build.bat
""
ANDROID_HOME=E:\adt-bundle-windows-x86_64-20140702\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_60
Running: E:\ionic\demo22\platforms\android\gradlew cdvBuildDebug -b E:\ionic\dem
o22\platforms\android\build.gradle -Dorg.gradle.daemon=true
Unzipping C:\Users\cxt\.gradle\wrapper\dists\gradle-2.2.1-all\2m8005s69iu8v0oiej
fej094b\gradle-2.2.1-all.zip to C:\Users\cxt\.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:219)
        at java.util.zip.ZipFile.<init>(ZipFile.java:149)
        at java.util.zip.ZipFile.<init>(ZipFile.java:163)
        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

E:\ionic\demo22\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "E:\ionic\demo22\platforms\androi
d\gradlew cdvBuildDebug -b E:\ionic\demo22\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\cxt\AppData\Roaming\npm\node_modules\cord
ova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

错误

推荐答案

首先您必须安装

First of all you have to install


  1. node.js


  2. JDK& JRE

  3. Android SDK& Eclipse

  1. node.js
  2. apache ANT
  3. JDK & JRE
  4. Android SDK & Eclipse

安装后,您必须将软件路径设置为环境变量。然后触发你的 npm install -g cordova

After installation, you have to set software paths into environmental- variable. Then fire your npm install -g cordova. Without this PhoneGap will not be created.

如果还有任何混乱或与软件安装相关的问题,请告诉我。

If still you have any confusion or question related to software installation then tell me.

这篇关于离子构建android错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 11:53