Ionic Build Android Error When Downloading Gradle

Ionic build Android error when downloading Gradle

I am using Ionic version 1.7.14 and the distributionUrl found in the following file. myApp/platforms/android/cordova/lib/builders/GradleBuilder.js.

I had to point the locally downloaded gradle as specified in this answer.

I had the same problem. I added gradle to my project offline.

After downloading gradle from issued link (here is http://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=http\\://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';

Gradle Problem, After My Build to android, [ Ionic ]

Had the same problem..
I changed the gradle to 7.0.3 (maybe it works with 7.1.1) and also the gradle JDK in Android Studio (Preferences... -> Build, Execution, Deployment -> Build Tools -> Gradle) to version 11.
Sometimes you have to reload Android Studio from VSCode to get it work.

getting Error while IONIC build properties.gradle does not Exist

Updating to the most recent version (v2.0.1) of cordova-android-support-gradle-release should resolve your issue:

ionic cordova platform rm android
ionic cordova plugin rm cordova-android-support-gradle-release
ionic cordova plugin add cordova-android-support-gradle-release@latest
ionic cordova platform add android
ionic cordova build android


Related Topics



Leave a reply



Submit