title: React native project I just created does not build
body: <p>Creating a new react native project. I'm trying to get a build when the project is created, but I'm getting an error.</p>
  <p>Here is the terminal output.</p>
  <blockquote>
  <p>Task :react-native-gradle-plugin:compileKotlin
  'compileJava' task (current target is 1.8) and 'compileKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (10, 37): 'BaseVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (119, 30): 'BaseVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (135, 26): 'BaseVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (155, 32): 'BaseVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (161, 31): 'BaseVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (169, 36): 'BaseVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt: (99, 48): 'reactRoot: DirectoryProperty' is deprecated. reactRoot was confusing and has been replace with rootto point to your root project and reactNativeDir to point to the folder of the react-native NPM package
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (10, 37): 'ApplicationVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (11, 37): 'BaseVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (12, 37): 'LibraryVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (28, 51): 'BaseVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (131, 12): 'ApplicationVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (132, 12): 'LibraryVariant' is deprecated. Deprecated in Java
  w: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (250, 14): 'BaseVariant' is deprecated. Deprecated in Java</p>
  </blockquote>
  <blockquote>
  <p>Task :react-native-gradle-plugin:compileJava
  6 actionable tasks: 6 executed
  Note: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/java/com/facebook/react/codegen/generator/SchemaJsonParser.java uses or overrides a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.</p>
  </blockquote>
  <p>FAILURE: Build failed with an exception.</p>
  <ul>
  <li><p>Where:
  Build file '/Users/bulutklinik/Desktop/JitsiProject/android/app/build.gradle' line: 1</p>
  </li>
  <li><p>What went wrong:
  A problem occurred evaluating project ':app'.</p>
  </li>
  </ul>
  <blockquote>
  <p>Failed to apply plugin 'com.android.internal.application'.
  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 <code>org.gradle.java.home</code> in <code>gradle.properties</code>.</p>
  </blockquote>
  <ul>
  <li>Try:</li>
  </ul>
  <blockquote>
  <p>Run with --stacktrace option to get the stack trace.
  Run with --info or --debug option to get more log output.
  Run with --scan to get full insights.</p>
  </blockquote>
  <ul>
  <li>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></li>
  </ul>
  <p>BUILD FAILED in 50s</p>
  <p>error Failed to install the app. Make sure you have the Android development environment set up: <a href="https://reactnative.dev/docs/environment-setup" rel="nofollow noreferrer">https://reactnative.dev/docs/environment-setup</a>.
  Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
  Note: /Users/bulutklinik/Desktop/JitsiProject/node_modules/react-native-gradle-plugin/src/main/java/com/facebook/react/codegen/generator/SchemaJsonParser.java uses or overrides a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.</p>
  <p>FAILURE: Build failed with an exception.</p>
  <ul>
  <li><p>Where:
  Build file '/Users/bulutklinik/Desktop/JitsiProject/android/app/build.gradle' line: 1</p>
  </li>
  <li><p>What went wrong:
  A problem occurred evaluating project ':app'.</p>
  </li>
  </ul>
  <blockquote>
  <p>Failed to apply plugin 'com.android.internal.application'.
  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 <code>org.gradle.java.home</code> in <code>gradle.properties</code>.</p>
  </blockquote>
  <ul>
  <li>Try:</li>
  </ul>
  <blockquote>
  <p>Run with --stacktrace option to get the stack trace.
  Run with --info or --debug option to get more log output.
  Run with --scan to get full insights.</p>
  </blockquote>
  <ul>
  <li>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></li>
  </ul>
  <p>BUILD FAILED in 50s</p>
  <pre><code>at makeError (/Users/bulutklinik/Desktop/JitsiProject/node_modules/execa/index.js:174:9)
  at /Users/bulutklinik/Desktop/JitsiProject/node_modules/execa/index.js:278:16
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  at async runOnAllDevices (/Users/bulutklinik/Desktop/JitsiProject/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
  at async Command.handleAction (/Users/bulutklinik/Desktop/JitsiProject/node_modules/@react-native-community/cli/build/index.js:192:9)
  </code></pre>
  <p>info Run CLI with --verbose flag for more details.</p>