[ERROR] An error occurred while running cordova build android

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
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).

What is your ionic info output?

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


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


backend : pro

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?