Got error when I upgrade jdk version 17.0.7 to 21.0.3
"react-native-restart": "^0.0.27",
jdk Version : "21.0.3"
Task :react-native-restart:compileDebugJavaWithJavac FAILED
ReactNativeFirebase WARNING: NPM package '@react-native-firebase/analytics' depends on '@react-native-firebase/app' v17.5.0 but found v17.4.3, this might cause build issues or runtime crashes.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
535 actionable tasks: 10 executed, 525 up-to-date
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-restart:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':react-native-restart:androidJdkImage'.
> Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JdkImageTransform: C:\Users\IndigoLearn_01\AppData\Local\Android\Sdk\platforms\android-33\core-for-system-modules.jar.
> Error while executing process C:\Program Files\Java\jdk-21.0.3\bin\jlink.exe with arguments {--module-path C:\Users\IndigoLearn_01\.gradle\caches\transforms-3\29e2f79444fc3d755f56006c223a0b31\transformed\output\temp\jmod --add-modules java.base --output C:\Users\IndigoLearn_01\.gradle\caches\transforms-3\29e2f79444fc3d755f56006c223a0b31\transformed\output\jdkImage --disable-plugin system-modules}
* Try:
> 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* Try:
> 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.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 1m
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDevDebug -PreactNativeDevServerPort=8081
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-restart:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':react-native-restart:androidJdkImage'.
> Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JdkImageTransform: C:\Users\IndigoLearn_01\AppData\Local\Android\Sdk\platforms\android-33\core-for-system-modules.jar.
> Error while executing process C:\Program Files\Java\jdk-21.0.3\bin\jlink.exe with arguments {--module-path C:\Users\IndigoLearn_01\.gradle\caches\transforms-3\29e2f79444fc3d755f56006c223a0b31\transformed\output\temp\jmod --add-modules java.base --output C:\Users\IndigoLearn_01\.gradle\caches\transforms-3\29e2f79444fc3d755f56006c223a0b31\transformed\output\jdkImage --disable-plugin system-modules}
* Try:
> 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* Try:
> 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.
==============================================================================
* Get more help at https://help.gradle.org
Got error when I upgrade jdk version 17.0.7 to 21.0.3
"react-native-restart": "^0.0.27", jdk Version : "21.0.3"