fluttercandies / flutter_image_compress

flutter image compress
MIT License
632 stars 215 forks source link

[Discussions] does plan support android jdk 17 #270

Closed Yongle-Fu closed 5 months ago

Yongle-Fu commented 9 months ago

Content

No response

Yongle-Fu commented 9 months ago
VictorUvarov commented 9 months ago

What changes to the plugin need to be made to fix this error?

aly22 commented 9 months ago

It's still not working for me.

vaconingham commented 8 months ago

Any update on this?

alviazirin commented 7 months ago

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

Mr-yuwei commented 7 months ago

same problem

Ravensof commented 7 months ago

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")
}
UtkuDalmaz commented 6 months ago

Can someone update this library for the sake of god

Miracle-Blue commented 6 months ago

https://github.com/fluttercandies/flutter_image_compress/issues/270#issuecomment-1868225821 - this is worked for me, please add this to library code

romatallinn commented 6 months ago

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

hunghuy201280 commented 5 months ago

any update?

vaconingham commented 5 months ago

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

hunghuy201280 commented 5 months ago

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
rignaneseleo commented 4 months ago

This is not fixed yet

SherpaMiguel commented 4 months ago

This is not fixed yet

Yes, it is. I removed the temporary solution provided by @Ravensof and it is working in production.

AlexV525 commented 4 months ago

The PR #289 includes JDK 17 rolling, the workflow runs with Java 17 and every job looks fine.