[ERROR] An error occurred while running cordova build android


#1

Someone already has this error !!!

14:12:08] sass finished in 8.14 s
[14:12:08] postprocess started …
[14:12:08] postprocess finished in 63 ms
[14:12:08] lint started …
[14:12:08] build dev finished in 46.00 s

cordova build android
[14:12:52] lint finished in 43.51 s
ANDROID_HOME=C:\Users\Guadina\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
Error: Cannot read property ‘toString’ of null

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


#2

What is your ionic info output?


#3

Hi , thank’s for your reply ,
this is my ionic info

cli packages: (C:\Users\Guadina\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v8.10.0
npm               : 5.6.0
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\Guadina\AppData\Local\Android\sdk

Misc:

backend : pro

#4

Your Cordova tooling seems to be out of date, which might be causing all kinds of problems.
You can read about how to figure out the current Cordova versions and how to update CLI, platforms and plugins here: https://ionic.zone/cordova/update

This also doesn’t make sense. What does ionic cordova platform list return?