-
Notifications
You must be signed in to change notification settings - Fork 319
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
[Bug report] Unknown kotlin JVM target: 21 after adding photo manager #1198
Comments
Any updates here, please? |
Needs merge |
Yeah, sorry about delay, so figured out its most likely an issue with the vscode flutter extension and new project setup. It happens with several packages not just photo_manager. The solution for me for anyone who comes across this was to open just the android project folder in android studio directly and android studio will popup with the AGP upgrade wizard and upgrade AGP from 8.1.0 to 8.7.0 (I think that was the versions dont have it in front of me to check) |
I've upgraded, but have the same issue |
I was having the same issue and after the following updates, the issue went away, might not work for everyone but I hope it helps some of you.
id "com.android.application" version "8.7.0" apply false
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
|
thanks,I followed your instructions, and it worked |
For me, this issue occured because my kotlin version is too low after I upgraded to newer gradle & agp version. Find a matching kotlin version and this issue went away. ref https://docs.gradle.org/current/userguide/compatibility.html |
Closing as the issue is not related to the plugin itself. |
It works for me, thanks. |
Version
3.3.0
Platforms
Android
Device Model
pixel 8
flutter info
How to reproduce?
using android 35 with java 21 in the build options gives this error after adding photo_manager
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
Logs
Example code (optional)
No response
Contact
No response
The text was updated successfully, but these errors were encountered: