Error for release android in ionic

Parass-MacBook-Air:sample parasvyas$ ionic cordova build --release android
Running app-scripts build: --platform android --target cordova
[10:43:24] build dev started …
[10:43:24] clean started …
[10:43:24] clean finished in 10 ms
[10:43:24] copy started …
[10:43:24] deeplinks started …
[10:43:24] deeplinks finished in 29 ms
[10:43:24] transpile started …
[10:43:29] transpile finished in 4.64 s
[10:43:29] preprocess started …
[10:43:29] preprocess finished in less than 1 ms
[10:43:29] webpack started …
[10:43:29] copy finished in 4.88 s
[10:43:36] webpack finished in 7.32 s
[10:43:36] sass started …
Without from option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to undefined to prevent this warning.
[10:43:38] sass finished in 1.71 s
[10:43:38] postprocess started …
[10:43:38] postprocess finished in 8 ms
[10:43:38] lint started …
[10:43:38] build dev finished in 14.04 s

cordova build android --release
Android Studio project detected

ANDROID_HOME=/Users/parasvyas/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
(node:60861) UnhandledPromiseRejectionWarning: CordovaError: Requirements check failed for JDK 1.8 or greater
at /Users/parasvyas/Desktop/sample/platforms/android/cordova/lib/check_reqs.js:370:19
at _fulfilled (/Users/parasvyas/Desktop/sample/platforms/android/cordova/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/Users/parasvyas/Desktop/sample/platforms/android/cordova/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/Users/parasvyas/Desktop/sample/platforms/android/cordova/node_modules/q/q.js:816:13)
at /Users/parasvyas/Desktop/sample/platforms/android/cordova/node_modules/q/q.js:624:44
at runSingle (/Users/parasvyas/Desktop/sample/platforms/android/cordova/node_modules/q/q.js:137:13)
at flush (/Users/parasvyas/Desktop/sample/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:60861) 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)
(node:60861) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

[10:43:43] lint finished in 4.59 s