Skip to content
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

Execution failed for task ':wakelock_plus:compileReleaseJavaWithJavac'. > error: invalid source release: 17 #60

Open
bassamalkhateb opened this issue May 13, 2024 · 8 comments

Comments

@bassamalkhateb
Copy link

**

Execution failed for task ':wakelock_plus:compileReleaseJavaWithJavac'.

error: invalid source release: 17

**

compileSdk 34
ndkVersion flutter.ndkVersion

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
    jvmTarget = '1.8'
}

classpath 'com.android.tools.build:gradle:7.3.1'

ext.kotlin_version = '1.9.10'

@Merlinski
Copy link

Same problem here

@eleojasmil
Copy link

Same Problem here,
any solution?

@diegotori
Copy link
Collaborator

As per version 1.2.0:

Library now requires Java 17 or higher and your app must build on API 34 (14 Upside Down Cake) on Android.

@Merlinski
Copy link

Thanks for your response. Issue still there with:

`compileSdkVersion 34
ndkVersion flutter.ndkVersion

compileOptions {
    sourceCompatibility JavaVersion.VERSION_17
    targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
    jvmTarget = '1.8'
}`

@diegotori
Copy link
Collaborator

Run flutter pub upgrade. Also, run flutter clean so that it rebuilds from scratch.

@Merlinski
Copy link

ok, thanks.
i think the problem was an overridden transitive dependency of package_info_plus (overriden to 4.2.0). But that justs switched the problem to package_info_plus:

Execution failed for task ':package_info_plus:compileReleaseJavaWithJavac'.
error: invalid source release: 17

To be precise i changed the jvmTarget to 17 too. As mentioned here #2723 i made the same changes.

@Hemant301
Copy link

plz tell how to solve this error

@Merlinski
Copy link

Merlinski commented May 25, 2024

For me the problem is solved exacly as dexcibed here..

If u depend on package_info_plus too and have issue with it have a look at
package_info_plus changelog

there are some requirements to fullfill since version 6.0.0
in my case i hade to migrate to grade 8.4 for android part

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants