Closed Yongle-Fu closed 5 months ago
'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version. Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain
What changes to the plugin need to be made to fix this error?
It's still not working for me.
Any update on this?
go into the plugin folder inside the package folder, on flutter_image_compress_common, android folder, on build.gradle file, change the android block add this configuration
`
compileSdkVersion 34
if (project.android.hasProperty("namespace")) {
namespace 'com.fluttercandies.flutter_image_compress'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
`
sadly this is just a stopgap solution, kinda like putting duct tape, run it, if it works then just build your app with this modification, if you want to keep the change persist, i recommend to just fork it and make modification, and sadly try to make it works with github url
same problem
example temporary solution for issues like that:
// android/build.gradle
subprojects {
afterEvaluate {
if (project.plugins.hasPlugin("com.android.application")
|| project.plugins.hasPlugin("com.android.library")) {
// todo https://github.com/avioli/uni_links/issues/187
if (project.name == "uni_links") {
project.android.namespace = "name.avioli.unilinks"
}
// todo https://github.com/fluttercandies/flutter_image_compress/issues/270
if (project.name == "flutter_image_compress_common") {
project.android.compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
}
}
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(":app")
}
Can someone update this library for the sake of god
https://github.com/fluttercandies/flutter_image_compress/issues/270#issuecomment-1868225821 - this is worked for me, please add this to library code
There are quite some PRs offered that should fix the problem. https://github.com/fluttercandies/flutter_image_compress/pull/271, https://github.com/fluttercandies/flutter_image_compress/pull/275, https://github.com/fluttercandies/flutter_image_compress/pull/276
@CaiJingLong @basveenema @shomatan
any update?
The developer seems to be all at sea. I ended up creating my own custom plugin for this. If you're in a pinch, just use the plugin locally and make the changes as per #277
here's temporary fix for this:
flutter_image_compress:
git:
url: https://github.com/hunghuy201280/flutter_image_compress.git
path: packages/flutter_image_compress
ref: 79172bb
This is not fixed yet
This is not fixed yet
Yes, it is. I removed the temporary solution provided by @Ravensof and it is working in production.
The PR #289 includes JDK 17 rolling, the workflow runs with Java 17 and every job looks fine.
Content
No response