Ionic build error when trying to build android app

BUILD FAILED

Total time: 14.083 secs

Error: /home/matynjr/newapp/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/home/matynjr/newapp/platforms/android/build.gradle’ line: 20

  • What went wrong:
    A problem occurred evaluating root project ‘android’.

java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Upgrade your JDK. At least 1.8 was required last I checked.

thanks but am already running jdk 1.8

You may have it installed, but are you certain that it is being used?

No am not certain of how to use it am a beginner so if you would help and explain how i can use it i will be grateful