pr0gramista / charset_converter

Flutter platform charset converter
BSD 3-Clause "New" or "Revised" License
33 stars 22 forks source link

charset_converter isn't compatible with newer Android setup #43

Closed AfsinShajiDev closed 3 weeks ago

AfsinShajiDev commented 2 months ago

Execution failed for task ':charset_converter:compileDebugKotlin'.

'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

boonkahming commented 1 month ago

I am also facing the same issue. Any updates on this?

pr0gramista commented 1 month ago

Hey, I wlll be looking at this next week. In the meantime, could you provide me more information about your setup, like a output from flutter doctor would be helpful. I guess this is an issue with Gradle/Android SDK version so perhaps downgrading or upgrading would solve this issue for you.

DaianeMGouvea commented 1 month ago

I am also facing the same problem

DaianeMGouvea commented 1 month ago

I managed to solve it by forcing the target JVM version for the entire project, like this:

android/build.gradle

allprojects {
    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
        kotlinOptions {
            jvmTarget = "1.8"
        }
    }
}

However, this has to be temporary as it can affect other dependencies that require the latest versions of Java. Is there any estimate of when we will have the fix?

pr0gramista commented 1 month ago

Hey, I'll be finally cleaning up my workstation this weekend, so I'll take a look on that with newer versions of everything. It would be useful to have a repository or at least flutter doctor output so I could easily reproduce the problem. Thanks!

pr0gramista commented 3 weeks ago

Hi, as promised, with an upgraded setup I was able to reproduce the issue. I'll release version 2.3.0 with the fix in a few minutes.