1
votes

When I try to compile app for Android the console returns this error:

Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=/Users/albertlopezleon/Library/Android/sdk (recommended setting) ANDROID_HOME=/Users/albertlopezleon/Library/Android/sdk (DEPRECATED) Requirements check failed for JDK 8 ('1.8.*')! Detected version: 12.0.1 Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables. [ERROR] An error occurred while running subprocess cordova.

But I uninstalled JDK 12 and installed JDK 8 and also defined the env variables, I can't understand what's happening.

The project info is that:

Ionic:

ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.2.0 @angular-devkit/build-angular : 0.13.8
@angular-devkit/schematics : 7.2.4 @angular/cli
: 7.3.8 @ionic/angular-toolkit : 1.4.1

Cordova:

cordova (Cordova CLI) : 9.0.0 ([email protected]) Cordova Platforms : android 8.0.0, ios 5.0.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 4 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/albertlopezleon/Library/Android/sdk) ios-deploy : 1.9.4 ios-sim : 7.0.0 NodeJS : v11.1.0 (/usr/local/bin/node) npm : 6.9.0 OS
: macOS High Sierra Xcode : Xcode 9.4.1 Build version 9F2000

1

1 Answers

0
votes
  1. Just remove ..bla..bla/<JAVA 12 location>/bin from environmental variable named PATH or uninstall java 12 from your PC if you don't want.
  2. Then try the same command with a new CMD prompt.

I hope it would help anyone.
Thank you :)