Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cordova 人行横道phonegap生成错误_Cordova - Fatal编程技术网

Cordova 人行横道phonegap生成错误

Cordova 人行横道phonegap生成错误,cordova,Cordova,https://github.com/infil00p/cordova-crosswalk-engine 从npm安装Cordova CLI的最新版本(版本>=4.2.0): 使用cordova Create创建项目,例如创建HelloWorld $ cordova create hello com.example.hello HelloWorld 导航到项目文件夹: $ cd hello 添加Android平台@4.0.0-dev $ cordova platform add https:

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

从npm安装Cordova CLI的最新版本(版本>=4.2.0):

使用cordova Create创建项目,例如创建HelloWorld

$ cordova create hello com.example.hello HelloWorld
导航到项目文件夹:

$ cd hello
添加Android平台@4.0.0-dev

$ cordova platform add https://github.com/apache/cordova-android.git
添加人行横道引擎插件:

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

$ 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)
$cordova构建android
赛:您好张赛雷$cordova构建android
运行命令:/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
正在运行:/Users/zhangsailei/hello/platforms/android/gradlew cdvBuildDebug-b/Users/zhangsailei/hello/platforms/android/build.gradle-Dorg.gradle.daemon=true
解压/Users/zhangsailei/.gradle/wrapper/dists/gradle-2.2.1-all/2M8005S69IU8V0OIEJ094B/gradle-2.2.1-all.zip至/Users/zhangsailei/.gradle/wrapper/dists/gradle-2.2.1-all/2M8005S69IU8V0OIEJ094B
线程“main”java.lang.RuntimeException中的异常:java.util.zip.zipeException:打开zip文件时出错
位于org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
位于org.gradle.wrapper.Install.createDist(Install.java:47)
位于org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
位于org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
原因:java.util.zip.ZipException:打开zip文件时出错
位于java.util.zip.ZipFile.open(本机方法)
位于java.util.zip.ZipFile。(ZipFile.java:128)
位于java.util.zip.ZipFile。(ZipFile.java:145)
位于org.gradle.wrapper.Install.unzip(Install.java:160)
位于org.gradle.wrapper.Install.access$400(Install.java:29)
安装$1.call(Install.java:70)
安装$1.call(Install.java:47)
位于org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
... 3个以上
/Users/zhangsailei/hello/platforms/android/cordova/node_modules/q/q.js:126
投掷e;
^
带有参数的命令:/Users/zhangsailei/hello/platforms/android/gradlew的错误代码1:cdvBuildDebug,-b,/Users/zhangsailei/hello/platforms/android/build.gradle,-Dorg.gradle.daemon=true
构建其中一个平台时出错:ERROR:/Users/zhangsailei/hello/platforms/android/cordova/build:命令失败,退出代码为1
您可能没有构建此项目所需的环境或操作系统
错误:/Users/zhangsailei/hello/platforms/android/cordova/build:命令失败,退出代码为1
在ChildProcess.whenDone(/usr/local/lib/node_modules/cordova/node_modules/cordova lib/src/cordova/superspawn.js:131:23)
在ChildProcess.emit(events.js:110:17)
在maybeClose(child_process.js:1008:16)
在Process.ChildProcess.\u handle.onexit(child\u Process.js:1080:5)

我知道你已经解决了这个问题,但这个答案更真实,我希望这能帮助其他人。 你可以使用这个被接受的答案。但它所要做的就是,您应该下载Gradle2.2.1-all.zip并将其粘贴到project中,然后从build.js调用它。
这对我来说很有效。

我也面临同样的问题……你找到解决方案了吗?下载gradle-2.2.1-all.zip解包到你的路径(/Users/zhangsailei/.gradle/wrapper/dists/gradle-2.2.1-all/2M8005S69IU8V0OIEJ094B),我已经解决了!我已经下载了gradle-2.2.1-all.zip并放到路径中。但是我仍然遇到同样的问题。你能指导我吗?可能是重复的
$ 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)