是建立Cordova应用程序所必需的

时间:2015-08-07 14:38:41

标签: android cordova gradle

自从我更新了Cordova并安装了gradle后,我无法构建以前正在运行的Android应用程序。我刚刚注意到我在尝试运行与gradle相关的android模拟器(之前有效)中的应用程序时出错了

Waiting for emulator...  
Booting up emulator (this may take a while).......................BOOT COMPLETE  
Running: /home/lyndon/myapp/platforms/android/gradlew cdvBuildDebug -b /home/lyndon/myapp/platforms/android/build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=true  
Unzipping /home/lyndon/.gradle/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b/gradle-2.2.1-all.zip to /home/lyndon/.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: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(ExclusiveFileAccessManager.java:65)  
... 3 more  

/home/lyndon/myapp/platforms/android/cordova/node_modules/q/q.js:126
                throw e;  
                      ^  
Error code 1 for command: /home/lyndon/myapp/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/lyndon/myapp/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true  
Error: /home/lyndon/myapp/platforms/android/cordova/run: Command failed with exit code 1  
at ChildProcess.whenDone   (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134: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)     

使用cordova构建Android应用程序是否需要gradle我可以摆脱它还是有其他方法来解决这个问题?谢谢!

0 个答案:

没有答案