I am working on Ubuntu 18.04. I have install jdk-10.0.1 and latest version of Android SDK. I have verify JAVA_HOME
and ANDROID_HOME
variables are set to correct respective directories.
Still when i triggering below command
ionic cordova build android --prod --release
It gives me following error after lint operation
ANDROID_HOME=/home/aby/Android/Sdk
JAVA_HOME=/home/aby/Java/jdk-10.0.1
(node:7586) UnhandledPromiseRejectionWarning: CordovaError: Requirements check failed for JDK 1.8 or greater at /home/aby/Projects/platforms/android/cordova/lib/check_reqs.js:370:19 at _fulfilled (/home/aby/Projects/platforms/android/cordova/node_modules/q/q.js:854:54) at self.promiseDispatch.done (/home/aby/Projects/platforms/android/cordova/node_modules/q/q.js:883:30) at Promise.promise.promiseDispatch (/home/aby/Projects/platforms/android/cordova/node_modules/q/q.js:816:13) at /home/aby/Projects/platforms/android/cordova/node_modules/q/q.js:624:44 at runSingle (/home/aby/Projects/platforms/android/cordova/node_modules/q/q.js:137:13) at flush (/home/aby/Projects/platforms/android/cordova/node_modules/q/q.js:125:13) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9)
(node:7586) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside ofan async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7586) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections thatare not handled will terminate the Node.js process with a non-zero exit code.
What should I do to make it working? What may be the reason of this error or should I used JDK instead of OpenJDK?