Problem running ionic cordova build android

Every time I tried to run the - ionic cordova build android --verbose, i get this:

[DEBUG] Reason for not using local CLI: LOCAL_CLI_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }

What can I do to solve it? I’ve already verified I had the requirements through ionic cordova requirements and got:

cordova requirements

Requirements check results for android:

Java JDK: installed 1.8.0

Android SDK: installed true
Android target: installed android-27,android-26,android-25,android-23
Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle

Please help me!

Solve what exactly? There is no error.

What is your problem?

What is your ionic info output?

That is also not the error, but just a part of it. Post the whole output of your build command.

The same error appears when I try to emulate or run on a device, therefore I thought it was this “error” that was causing it. If it is not the culprit, why doesn’t the emulator/mobile phone react to the emulate/run command?

The output:
Running app-scripts build: --platform android --target cordova
[18:19:26] build dev started …
[18:19:26] clean started …
[18:19:26] clean finished in 6 ms
[18:19:26] copy started …
[18:19:26] deeplinks started …
[18:19:26] deeplinks finished in 71 ms
[18:19:26] transpile started …
[18:19:29] transpile finished in 2.58 s
[18:19:29] preprocess started …
[18:19:29] preprocess finished in less than 1 ms
[18:19:29] webpack started …
[18:19:29] copy finished in 2.78 s
[18:19:34] webpack finished in 5.30 s
[18:19:34] sass started …
[18:19:35] sass finished in 1.13 s
[18:19:35] postprocess started …
[18:19:35] postprocess finished in 7 ms
[18:19:35] lint started …
[18:19:35] build dev finished in 9.20 s

cordova build android
ANDROID_HOME=/Users/lauraalpinto/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
Error: spawn EACCES

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

[18:19:37] lint finished in 1.95 s

I didn’t say you don’t have an error, only that you are not posting the complete error message.

This is the complete error message.

Run the same command with --verbose please. Additional output?

Possibly you can fix this by installing a standalone Gradle:

Also try upgrading to cordova-android 6.4.0.