Open tempo-riz opened 1 month ago
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':receive_sharing_intent:compileDebugKotlin'.
Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).
Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation
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 7s Error: Gradle task assembleDebug failed with exit code 1
Exited (1).
Which Gradle version are you using?
@davidfranquet: distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "8.1.1" apply false // START: FlutterFire Configuration id "com.google.gms.google-services" version "4.3.15" apply false // END: FlutterFire Configuration id "org.jetbrains.kotlin.android" version "2.0.0" apply false }
App only throws error after this package is added.
The solution for now is downgrading your gradle version to 7.3.0
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}
@davidfranquet it appears my project will not let me downgrade as I am working on latest flutter. Can you suggest some alternative.
I have the same issue
I'm using Flutter 3.24.3
@davidfranquet it appears my project will not let me downgrade as I am working on latest flutter. Can you suggest some alternative.
I'm using Flutter 3.24.3
environment:
....
flutter: ^3.24.3
What's your error?
Any news here guys? This is a showstopper.
create a new flutter project using flutter 3.24.3
and add receive_sharing_intent
and it fails with the same error: Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).
I haven't fully tested this yet, but adding following code
#compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
to build.gradle helped me.
Execution failed for task ':receive_sharing_intent:compileDebugKotlin'.
full log :