When trying to create an android apk file using ionic and gradle, i get an error
FAILURE: Build failed with an exception.
* What went wrong:
Unable to star
In my case I just had to put all my environment variables for the Java Runtime Environment (JRE) and the Java Development Kit (JDK) to the 64 bit version.
To do so, I went to oracle's website, and simply downloaded the 64 bit JRE and JDKs.
During the installation I checked it was well installed in C:\Program Files\Java
and not in C:\Program Files (x86)\Java
,
Then I set the environnment variable:
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0_121
- Path: "C:\Program Files\Java\jre1.8.0_121\bin" and "C:\Program Files\Java\jdk1.8.0_121\bin"
Hope it helps!