2

https://github.com/infil00p/cordova-crosswalk-engine

Install the latest version of the Cordova CLI from npm (version >= 4.2.0):

$ npm install -g cordova

Create a project with cordova create, e.g creating HelloWorld

$ cordova create hello com.example.hello HelloWorld

Navigate to the project folder:

$ cd hello

Add the Android platform @4.0.0-dev

$ cordova platform add https://github.com/apache/cordova-android.git

Add the Crosswalk engine plugin:

$ cordova plugin add  https://github.com/MobileChromeApps/cordova-crosswalk-engine.git

Build:

$ cordova build android



sai:hello zhangsailei$ cordova build android
Running command: /Users/zhangsailei/hello/platforms/android/cordova/build 
ANDROID_HOME=/Applications/adt-bundle-mac-x86_64-20140321/sdk
JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Running: /Users/zhangsailei/hello/platforms/android/gradlew cdvBuildDebug -b /Users/zhangsailei/hello/platforms/android/build.gradle -Dorg.gradle.daemon=true
Unzipping /Users/zhangsailei/.gradle/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b/gradle-2.2.1-all.zip to /Users/zhangsailei/.gradle/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
    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.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:128)
    at java.util.zip.ZipFile.<init>(ZipFile.java:145)
    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(ExclusiveFileAccessManager.java:65)
    ... 3 more

/Users/zhangsailei/hello/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: /Users/zhangsailei/hello/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/zhangsailei/hello/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /Users/zhangsailei/hello/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /Users/zhangsailei/hello/platforms/android/cordova/build: Command failed with exit code 1
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1008:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
AstroCB
  • 12,337
  • 20
  • 57
  • 73
sailei
  • 65
  • 1
  • 1
  • 4
  • i had the same issue facing ..did you find any solution for this? – rkv Apr 29 '15 at 08:31
  • 1
    download gradle-2.2.1-all.zip unpack to your path(/Users/zhangsailei/.gradle/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b) , I already fix it! – sailei Apr 30 '15 at 04:27
  • i have downloaded the gradle-2.2.1-all.zip and put into the path.but still i am getting same issues.can you please guide me? – rkv Apr 30 '15 at 07:18
  • Possible duplicate of [Cordova Build Gradle Error while opening/extracting zip file](http://stackoverflow.com/questions/32535930/cordova-build-gradle-error-while-opening-extracting-zip-file) – Nick Song Nov 09 '15 at 03:39

1 Answers1

0

I know you solved it already but this answer is more genuine and i hope this help others. you could use the accepted answer of this question. but all there is to it is that you should download gradle 2.2.1-all.zip and paste it in project then call it from build.js . it worked for me.

Community
  • 1
  • 1
Pouya Danesh
  • 1,557
  • 2
  • 19
  • 36