-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Inconsistent JVM Target Compatibility: Support for Java 17 #615
Comments
i have the same problem |
Temporary solution: // @work/android/build.gradle
allprojects {
...
subprojects {
afterEvaluate { project ->
if (project.plugins.hasPlugin("kotlin-android")) {
project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
...
}
...
}
...
}
if (project.plugins.hasPlugin("com.android.application") || project.plugins.hasPlugin("com.android.library")) {
project.android {
...
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
...
}
}
...
}
...
}
...
}
}
... |
Thanks :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I am facing an issue while building my project that uses flutter_callkit_incoming, as my project requires Java 17 compatibility. The error is as follows:
Execution failed for task ':flutter_callkit_incoming:compileDebugKotlin'.
Steps to Reproduce:
Set the sourceCompatibility and targetCompatibility in my project to JavaVersion.VERSION_17.
Add flutter_callkit_incoming as a dependency.
Try to build the project.
Expected Behavior:
The library should support Java 17 for compatibility with modern Android projects.
Actual Behavior:
The build fails due to JVM compatibility mismatch.
Proposed Solution:
Update the build.gradle of the library to support Java 17:
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
Additional Info:
Flutter version: Flutter (Channel stable, 3.27.0, on Microsoft Windows [Version 10.0.22621.4317], locale en-US)
flutter_callkit_incoming version: flutter_callkit_incoming: ^2.0.4+2
Kotlin version: (1.9.10)
Android Gradle Plugin version: (distributionUrl=https://services.gradle.org/distributions/gradle-8.9-all.zip)
I appreciate your help in resolving this issue or providing a workaround for compatibility with Java 17.
Thank you!
The text was updated successfully, but these errors were encountered: