(node:6872) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec tion id: 1): CordovaError: Failed to run “javac -version”, make sure that you ha ve a JDK installed.
You can get it from:
Your JAVA_HOME is invalid: %JAVA_HOME%\bin;C:\Program Files\Java\jdk1.8.0_161;C: \ApacheAnt\apache-ant-1.10.1\bin;C:\Program Files\Java\jdk1.8.0_162;

(node:6872) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre cated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Someone I should help?
I already uninstalled the java and installed it I put the right path already made everything and the error persists

please open the terminal and run javac command and Show the output here
Thank you.

  1. There is a spce after C: for ApacheAnt.
  2. Do these paths exist?
  3. You have two JDKs in your var. Why?

yes there is a path to ApacheAnt. I have two java sdk because neither one of them works already I installed it I uninstalled I kept one and nothing of working

comando javac
Usage: javac
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath Specify where to find user class files and annotation processors
-cp Specify where to find user class files and annotation processors
-sourcepath Specify where to find input source files
-bootclasspath Override location of bootstrap class files
-extdirs Override location of installed extensions
-endorseddirs Override location of endorsed standards path
-proc:{none,only} Control whether annotation processing and/or compilation is done.
-processor [,,…] Names of the annotation processors to run; bypasses default discovery process
-processorpath Specify where to find annotation processors
-parameters Generate metadata for reflection on method parameters
-d Specify where to place generated class files
-s Specify where to place generated source files
-h Specify where to place generated native header files
-implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files
-encoding Specify character encoding used by source files
-source Provide source compatibility with specified release
-target Generate class files for specific VM version
-profile Check that API used is available in the specified profile
-version Version information
-help Print a synopsis of standard options
-Akey[=value] Options to pass to annotation processors
-X Print a synopsis of nonstandard options
-J Pass directly to the runtime system
-Werror Terminate compilation if warnings occur
@ Read options and filenames from file

please try at once just add \bin to Path
like this
C:\Program Files\Java\jdk1.8.0_161\bin
thank you.

then Path is already with C: \ Program Files \ Java \ jdk1.8.0_161 \ bin
the JAVA_HOME C: \ Program Files \ Java \ jdk1.8.0_161 \ bin and
C: \ Program Files \ Java \ jdk1.8.0_161
does not work already rebooted removi installed not installed, already removed the platform added again and nothing
my system and windows 10, and the first time I did the build worked now does not work anymore