Ok so sorted the JDK issue out now. but now when I run ionic cordova build --release android I get this error as well
(node:13340) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Source path does not exist: resources/android/icon/drawable-hdpi-icon.png
(node:13340) [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.
but it proceeds to finish, and when I check the build folder for the unsigned apk, nothing is in there it's empty.