-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting 'Unknown Kotlin JVM target: 21' error if we build with JDK 21. #21
Comments
Hello @rajurevoori , Kind regards, |
@msikyna , When are you planning to release this fix? |
Hi @rajurevoori, adding kotlinOptions { jvmTarget = "17" } as you suggested fixes the problem. We'll add this into the next release, which should be out at latest next week. To compile the project now, you can either set JDK to 17 in Android Studio, or add kotlinOptions in the build.gradle in our plugin (node_modules/capacitor-freerasp/android/build.gradle) Regards, |
Will this be going out with release 1.6.0? Also having the same issues. |
Yes, it will Regards, |
Thank you, I suspected as much. I did the manual change in the grade as suggested but always feel uneasy changing package files. |
Thank you all for fix. |
Description
In new Android Studio(Ladybug | 2024.2.1 Patch 1 which released on Build #AI-242.23339.11.2421.12483815, built on October 11, 2024) default android gradle JDK version set to 21. When we add this plugin and try to run the app getting below error.
org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':capacitor-freerasp:compileDebugKotlin'.
Caused by: java.lang.IllegalArgumentException: Unknown Kotlin JVM target: 21
To Reproduce
Add this plugin to ionic capacitor project.
Update gradle JDK to 21
Build the app.
Expected behavior
We should not get any kotlin compatable error with JDK 21
Please complete the following information:
Build issue.
Version of freeRASP:1.4.0, 1.5.2
Additional context
At least add below kotlin options in the plugin gradle.
kotlinOptions { jvmTarget = "17" }
The text was updated successfully, but these errors were encountered: