I'm having trouble running the $ phonegap run android command. It gives the following error:
C:\Users\maquina05\App_Oliver>phonegap run android [phonegap] executing 'cordova run android ' ... ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_111 Subproject Path: CordovaLib Unzipping C:\Users\maquina05\.gradle\wrapper\dists\gradle-2.14.1-alll0mv9mggp 9q5m2ip574m21oh\gradle-2.14.1-all.zip to C:\Users\maquina05\.gradle\wrapper\dist s\gradle-2.14.1-alll0mv9mggp9q5m2ip574m21oh Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: zip file is empty 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: zip file is empty 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 Error: cmd: Command failed with exit code 1 Error output: Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipExceptio n: zip file is empty 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: zip file is empty 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
Excuting $ cordova run android, gives exactly the same error.
How can I solve this problem?
Denis. I did your procedure and gave the following error.
C:\Users\maquina05\App_Oliver>cordova build
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_111
Subproject Path: CordovaLib
Downloading http://services.gradle.org/distributions/gradle-2.14.1-all.zip
...............................................................................
Unzipping C:\Users\maquina05\.gradle\wrapper\dists\gradle-2.14.1- alll0mv9mggp
9q5m2ip574m21oh\gradle-2.14.1-all.zip to C:\Users\maquina05\.gradle\wrapper\dist
s\gradle-2.14.1-alll0mv9mggp9q5m2ip574m21oh
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/
2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap.
I created the gradient in the environment variables and when I give the command:
$gradle -v
------------------------------------------------------------
Gradle 3.4.1
------------------------------------------------------------
Build time: 2017-03-03 19:45:41 UTC
Revision: 9eb76efdd3d034dc506c719dac2955efb5ff9a93
Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_111 (Oracle Corporation 25.111-b14)
OS: Windows 7 6.1 x86