Ionic app run

ionic-app-scripts build --target cordova --platform android
[17:07:46] ionic-app-scripts 3.2.0
[17:07:46] build dev started …
[17:07:46] clean started …
[17:07:46] clean finished in 15 ms
[17:07:46] copy started …
[17:07:46] deeplinks started …
[17:07:46] deeplinks finished in 72 ms
[17:07:46] transpile started …
[17:07:55] transpile finished in 8.53 s
[17:07:55] preprocess started …
[17:07:55] preprocess finished in 1 ms
[17:07:55] webpack started …
[17:07:55] copy finished in 8.85 s
[17:08:02] webpack finished in 6.84 s
[17:08:02] sass started …
[17:08:03] sass finished in 1.77 s
[17:08:03] postprocess started …
[17:08:03] postprocess finished in 17 ms
[17:08:03] lint started …
[17:08:03] build dev finished in 17.50 s
[17:08:08] lint finished in 4.99 s

cordova build android
Android Studio project detected
Preparing Firebase on Android
Failed to run “javac -version”, make sure that you have a JDK installed.
You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.
Your JAVA_HOME is invalid: C:\Program Files\Java\jdk-11.0.1\bin

[ERROR] An error occurred while running subprocess cordova.

    cordova build android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.