I am using Windows 7X64 machine and trying to build Andriod application using cordova/ionic CLI v1.5.5
. I am getting this error that I couldn\'t solve.
NOTE: This turns out to be a Network issue. 403 is permission issue in client. I connected my machine to different network and it started working. All build process. If you wanna do it manually here is how far I got.
Solution for not Valid JAVA_HOME
After spending days and uninstalling all versions of java, reinstalling only one version and setting up Environment VariableJAVA_HOME
as C:\Program Files\Java\jdk1.7.0_15
I solved the problem.
However there was another issue of ionic build android error when downloading gradle.
This was solved as I added gradle to my project offline.
Solution for not Gradle 403 Http response
Do the following:
After downloading gradle from issued link (here is https://services.gradle.org/distributions/gradle-2.2.1-all.zip) paste it in somewhere likes myApp\platforms\android\gradle\gradle-2.2.1-all.zip
and in build.js from myApp\platforms\android\cordova\lib\build.js
find this:
var distributionUrl = 'distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip'
;
And replace it with your own file's location:
var distributionUrl = 'distributionUrl=../gradle-2.2.1-all.zip';
Still working on build and will keep on posting the solution. A thread about other issues is created in ionic forum and it is here.