title: Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8(react-native Android)
body: <p>I upgraded my gradle version from 4.x to 7.x,</p>
  <pre><code>buildscript {
      ext {
          ...
      }
      repositories {
          google()
          mavenCentral()
      }
      dependencies {
          classpath('com.android.tools.build:gradle:7.0.2')
          ...
      }
  }
  </code></pre>
  <p>and then started to face the issue below:</p>
  <pre><code>* Where:
  Build file '/var/lib/jenkins/workspace/TradeApp/node_modules/@react-native-async-storage/async-storage/android/build.gradle' line: 72
  
  * What went wrong:
  A problem occurred evaluating project ':@react-native-community_async-storage'.
  &gt; Failed to apply plugin 'com.android.internal.library'.
     &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>I would appreciate if someone can help to resolve this issue and not a workaround(downgrading back to 4.x works, but I want to know why it's not working with 7.x)</p>