Android build fail: Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option

Hi!
I’m trying to build my managed workflow project and I’m getting this error:
Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper ‘-jvm-target’ option

Here is the relevant part from the gradlew build log:

> Task :expo-media-library:compileReleaseKotlin FAILED
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryModule.kt: (442, 76): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryUtils.kt: (138, 32): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/albums/CreateAlbum.kt: (29, 8): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/albums/CreateAlbum.kt: (36, 8): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/assets/CreateAsset.kt: (95, 54): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/assets/CreateAsset.kt: (120, 7): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/assets/GetAssetsQuery.kt: (20, 30): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/assets/GetAssetsQuery.kt: (24, 6): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/assets/GetAssetsQuery.kt: (62, 25): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/assets/GetAssetsQuery.kt: (65, 26): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/assets/GetAssetsQuery.kt: (78, 53): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
[stderr] e: /home/expo/workingdir/build/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/assets/GetAssetsQuery.kt: (89, 44): Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
> Task :expo-file-system:compileReleaseKotlin
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (8, 19): 'AsyncTask<Params : Any!, Progress : Any!, Result : Any!>' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (428, 27): Type mismatch: inferred type is String? but String was expected
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (472, 29): Type mismatch: inferred type is String? but String was expected
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (561, 43): Parameter 'options' is never used
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (649, 46): Parameter 'options' is never used
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (773, 43): Unchecked cast: Any? to Map<String, Any>?
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (790, 40): 'create(MediaType?, File): RequestBody' is deprecated. Moved to extension function. Put the 'file' argument first to fix Java
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (795, 15): Unchecked cast: Any to Map<String, Any>
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (927, 49): Unchecked cast: Any? to Map<String, Any>?
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (1028, 43): Unchecked cast: Any? to Map<String, Any>?
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (1040, 9): 'execute(vararg FileSystemModule.DownloadResumableTaskParams?): AsyncTask<FileSystemModule.DownloadResumableTaskParams?, Void?, Void?>!' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (1101, 47): 'AsyncTask<Params : Any!, Progress : Any!, Result : Any!>' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (1101, 47): 'constructor AsyncTask<Params : Any!, Progress : Any!, Result : Any!>()' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (1114, 21): Variable 'count' initializer is redundant
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (1248, 39): 'toLowerCase(Locale): String' is deprecated. Use lowercase() instead.
w: /home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt: (1285, 35): Type mismatch: inferred type is String? but String was expected
> Task :expo-notifications:compileReleaseKotlin
w: /home/expo/workingdir/build/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/service/delegates/Base64Serialization.kt: (26, 45): Returning type parameter has been inferred to Nothing implicitly because Nothing is more specific than specified expected type. Please specify type arguments explicitly in accordance with expected type to hide this warning. Nothing can produce an exception at runtime. See KT-36776 for more details.
w: /home/expo/workingdir/build/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/service/delegates/ExpoPresentationDelegate.kt: (176, 70): 'priority: Int' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/service/delegates/ExpoPresentationDelegate.kt: (177, 41): 'vibrate: LongArray!' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/service/delegates/ExpoPresentationDelegate.kt: (178, 30): 'sound: Uri!' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/service/delegates/FirebaseMessagingDelegate.kt: (112, 30): Unnecessary safe call on a non-null receiver of type (Mutable)Map<String!, String!>. This expression will have nullable type in future releases
> Task :expo-updates:kaptGenerateStubsReleaseKotlin
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
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.3.3/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 2 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
513 actionable tasks: 513 executed
[stderr] FAILURE: Build completed with 2 failures.
[stderr] 1: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] Execution failed for task ':expo-sharing:compileReleaseKotlin'.
[stderr] > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
[stderr]    > Compilation error. See log for more details
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] 2: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] Execution failed for task ':expo-media-library:compileReleaseKotlin'.
[stderr] > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
[stderr]    > Compilation error. See log for more details
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 4m 48s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

I’m using the ‘react-native-fusioncharts’ library in my project and when I tried to build the app without fusion-charts the build succeeded, even though the app actually couldn’t run on my phone.

When I run the expo-cli doctor I’m getting this if the fusion charts library is in my project:

Running "expo doctor"
- Finding all copies of expo-modules-autolinking
[stderr] [18:34:32] Expected package expo-modules-autolinking@~0.10.1
[stderr] [18:34:32] Found invalid:
[stderr] [18:34:32]   expo-modules-autolinking@0.5.5
[stderr] [18:34:32]   (for more info, run: npm why expo-modules-autolinking)
- Finding all copies of @expo/config-plugins
[stderr] [18:34:33] Expected package @expo/config-plugins@^5.0.0
[stderr] [18:34:33] Found invalid:
[stderr] [18:34:33]   @expo/config-plugins@4.1.5
[stderr]   @expo/config-plugins@4.1.5
[stderr]   @expo/config-plugins@4.0.6
[stderr] [18:34:33]   (for more info, run: npm why @expo/config-plugins)
- Finding all copies of @expo/prebuild-config
- Finding all copies of @unimodules/core
- Finding all copies of @unimodules/react-native-adapter
- Finding all copies of react-native-unimodules
Command "expo doctor" failed.
bash exited with non-zero code: 1

and a success if ‘fusion-charts’ is not in the project.

I searched throughout the whole project for the jvmTarget that are in all of the build.gradle files and this is what I’ve found:

node_modules/expo-media-library/android/build.gradle:    jvmTarget = JavaVersion.VERSION_1_8
node_modules/expo-notifications/android/build.gradle:    jvmTarget = JavaVersion.VERSION_1_8
node_modules/expo-notifications/node_modules/expo-constants/android/build.gradle:    jvmTarget = JavaVersion.VERSION_1_8
node_modules/expo-application/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-structured-headers/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-updates-interface/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-file-system/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-constants/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-updates/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-eas-client/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-error-recovery/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-json-utils/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-sharing/android/build.gradle:    jvmTarget = JavaVersion.VERSION_1_8
node_modules/expo-splash-screen/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-modules-core/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/react-native-fusioncharts/node_modules/expo-file-system/android/build.gradle:    jvmTarget = JavaVersion.VERSION_1_8
node_modules/react-native-fusioncharts/node_modules/expo-constants/android/build.gradle:    jvmTarget = JavaVersion.VERSION_1_8
node_modules/react-native-fusioncharts/node_modules/expo-modules-core/android/build.gradle:    jvmTarget = JavaVersion.VERSION_1_8
node_modules/react-native-fusioncharts/node_modules/expo/android/build.gradle:    jvmTarget = '1.8'
node_modules/react-native-fusioncharts/node_modules/expo-keep-awake/android/build.gradle:    jvmTarget = "1.8"
node_modules/react-native-fusioncharts/node_modules/expo-font/android/build.gradle:    jvmTarget = "1.8"
node_modules/expo-keep-awake/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/expo-manifests/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion
node_modules/react-native-gradle-plugin/build.gradle.kts:        jvmTarget = JavaVersion.VERSION_11.majorVersion
grep: node_modules/react-native-gradle-plugin/.gradle/7.3.3/executionHistory/executionHistory.bin: binary file matches
node_modules/expo-font/android/build.gradle:    jvmTarget = JavaVersion.VERSION_11.majorVersion

So it seems to me that there is a problem with unmatching versions of expo plugins used in SDK 46 and in the ‘fusion-charts’ library, but I’m not really sure of it because I’m pretty new to app programming. I’ve Googled everything and couldn’t find any solution.
I’m using eas-cli version 2.4.0.

Has anyone here had the same problem or know how to solve it?
Thanks in advance!