Search code examples
androidionic-frameworkbuildionic4

Ionic4 build android


I would like build my ionic app for android but i have an error.

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\masmas\AppData\Local\Android\sdk (DEPRECATED)
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd build android --release exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

Solution

  • You must install Gradle manually, as latest versions of android studio is not supporting the gradle build from external sources.To install gradle:- https://gradle.org/install/.