I’m getting the following error when building android app locally:
ionic cordova build android
Running app-scripts build: --iscordovaserve --external-ip-required --nobrowser
[22:35:07] build dev started …
[22:35:07] clean started …
[22:35:07] clean finished in less than 1 ms
[22:35:07] copy started …
[22:35:07] transpile started …
[22:35:11] transpile finished in 3.77 s
[22:35:11] preprocess started …
[22:35:11] deeplinks started …
[22:35:11] deeplinks finished in 15 ms
[22:35:11] preprocess finished in 15 ms
[22:35:11] webpack started …
[22:35:11] copy finished in 4.44 s
[22:35:21] webpack finished in 10.32 s
[22:35:21] sass started …
[22:35:23] sass finished in 2.08 s
[22:35:23] postprocess started …
[22:35:23] postprocess finished in 13 ms
[22:35:23] lint started …
[22:35:23] build dev finished in 16.26 s
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):
ANDROID_HOME=D:\Desarrollo\AndroidSDKTools
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_51
Error: 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
This is my environment configuration:
ionic info
global packages:
@ionic/cli-utils : 1.2.0
Cordova CLI : 7.0.1
Ionic CLI : 3.2.0
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.2.1
@ionic/cli-plugin-ionic-angular : 1.2.0
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.3.0
System:
Node : v6.10.2
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed