Ionic cordova run android error related to environment variables

install JDK 8 its mismatching download it following link

Requirements check failed for JDK 8 (‘1.8.*’)! Detected version: 12.0.2

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html