title: Why is JAVA version not detected? Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8
body: <p>I am trying to build app in App Center. Build.gradle</p>
  <pre><code>buildscript {
      ext.kotlin_version = &quot;1.5.30&quot;
      repositories {
          google()
          mavenCentral()
          mavenLocal()
      }
      dependencies {
          classpath &quot;com.android.tools.build:gradle:7.0.2&quot;
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;
          classpath &quot;com.bugsnag:bugsnag-android-gradle-plugin:7.0.0&quot;
      }
  }
  </code></pre>
  <p>App build.gradle</p>
  <pre><code>apply plugin: &quot;com.android.application&quot;
  apply plugin: &quot;kotlin-android&quot;
  
  android {
      compileSdkVersion 30
      ndkVersion &quot;17.2.4988734&quot;
  
      defaultConfig {
          applicationId &quot;com.example.bugsnag.android&quot;
          minSdkVersion 14
          targetSdkVersion 30
          versionCode 1
          versionName &quot;1.0&quot;
      }
      signingConfigs {
          config {
              keyAlias &quot;password&quot;
              keyPassword &quot;password&quot;
              storeFile file(&quot;../fakekeys.jks&quot;)
              storePassword &quot;password&quot;
          }
      }
      buildTypes {
          release {
              minifyEnabled true
              proguardFiles getDefaultProguardFile(&quot;proguard-android-optimize.txt&quot;), &quot;proguard-rules.pro&quot;
              signingConfig signingConfigs.config
          }
      }
      externalNativeBuild.cmake.path &quot;CMakeLists.txt&quot;
      compileOptions {
          sourceCompatibility = JavaVersion.VERSION_11
          targetCompatibility = JavaVersion.VERSION_11
      }
      kotlinOptions {
          jvmTarget = &quot;11&quot;
      }
  }
  
  dependencies {
      implementation &quot;com.bugsnag:bugsnag-android:5.12.0&quot;
      implementation &quot;org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version&quot;
      implementation &quot;androidx.appcompat:appcompat:1.3.1&quot;
      implementation &quot;com.google.android.material:material:1.4.0&quot;
  }
  
  apply plugin: &quot;com.bugsnag.android.gradle&quot;
  bugsnag.failOnUploadError = false
  </code></pre>
  <p>Why is JAVA 11 not detected? How to test this?</p>
  <p>I am not sure if my ANdroid Studio has JAVA 11,image below shows Moules for my Project
  <a href="https://i.stack.imgur.com/K0MvP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K0MvP.png" alt="enter image description here" /></a></p>
  <p>It shows
  <a href="https://i.stack.imgur.com/c9uVG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c9uVG.png" alt="enter image description here" /></a></p>
  <p>Gradle properties
  <a href="https://i.stack.imgur.com/HFQCp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HFQCp.png" alt="enter image description here" /></a></p>
  <p>App Center build log</p>
  <pre><code>&gt; Failed to apply plugin 'com.android.internal.application'.
     &gt; Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
       You can try some of the following options:
         - changing the IDE settings.
         - changing the JAVA_HOME environment variable.
         - changing `org.gradle.java.home` in `gradle.properties`.
  </code></pre>
  <p>How to edit gradle.properties? org.gradle.java.home = WHAT?</p>
  <p>If JDK 11 is resolved,why build fails?</p>