Problem Description:
A lot of people, after upgrading to 3 in Ionic, find out for no apparent reason that when we add the Android platform, build or run, the command-line window prompts us:
If you add Android platform at Ionic2, there is no problem upgrading to Ionic3;
But if you remove the Android platform and add it again, this problem will occur.
Problem cause:
Cordova after 6.4.0 (cordova-android in 6.1.2), Gradle is required to install, build and pack Android based on Gradle.
(The specific version number needs to be verified, but need to install Gradle is true)
===============================================================
Workaround:
1) go to gradle official website: https://gradle.org/install
2) Download gradle:https://gradle.org/releases, I am downloading the latest version 3.5 (gradle-3.5-bin.zip);
3) unzip, place yourself;
4) Configure environment variables: System Variables--path--edit:
5) Verify:
6) continues Ionic Cordova build Android.
This step may require you to restart your computer, and I compiled it successfully after restarting the computer.
Could not find a installed version of Gradle either in Android studio