Cordova build android Running command - failed!


#1

$ ionic cordova build android

cordova build android
× Running command - failed!

[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova build android (exit code 1):

    Running command: cmd "/s /c "node C:\Users\Dell\desktop\alam\hooks\after                                                                                                                _prepare\010_add_platform_class.js C:\Users\Dell\desktop\alam""
    add to body class: platform-android
    ANDROID_HOME=C:\Users\Dell\AppData\Local\Android\sdk
    JAVA_HOME=C:\Program Files\Java\jdk1.8.0_77
    Error: Could not find an installed version of Gradle either in Android S                                                                                                      tudio
    or on your system to install the gradle wrapper. Please include gradle
    in your path, or install Android Studio

#2

install android studio, it will setup for you


#3

I already installed.


#4

Could be useful for you :


#5

Run cordova requirements. It will tell you what is missing and (maybe) how to fix it. Make this command happy, then it will work.


#6

Hi, @Sujan12

I did this command i got this status

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-25
Gradle: not installed
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: Some of requirements check failed