Check failed for JDK 1.8 or greater


#1

paths are -

ANDROID_HOME=/Users/anujsingh/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home

Error -

Android Studio project detected
ANDROID_HOME=/Users/anujsingh/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
(node:4180) UnhandledPromiseRejectionWarning: CordovaError: Requirements check failed for JDK 1.8 or greater
    at /Users/anujsingh/Downloads/myApp/platforms/android/cordova/lib/check_reqs.js:370:19
    at _fulfilled (/Users/anujsingh/Downloads/myApp/platforms/android/cordova/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/Users/anujsingh/Downloads/myApp/platforms/android/cordova/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (/Users/anujsingh/Downloads/myApp/platforms/android/cordova/node_modules/q/q.js:816:13)
    at /Users/anujsingh/Downloads/myApp/platforms/android/cordova/node_modules/q/q.js:624:44
    at runSingle (/Users/anujsingh/Downloads/myApp/platforms/android/cordova/node_modules/q/q.js:137:13)
    at flush (/Users/anujsingh/Downloads/myApp/platforms/android/cordova/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:112:11)
(node:4180) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)