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 ':photo_manager:compileDebugKotlin' Unknown Kotlin JVM target: 21 #1202

Closed
eslamwael74 opened this issue Oct 14, 2024 · 6 comments

Comments

@eslamwael74
Copy link

eslamwael74 commented Oct 14, 2024

Version

3.5.1

Platforms

Android

Device Model

Android

flutter info

flutter doctor -v
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-x64, locale en-US)
    • Flutter version 3.24.3 on channel stable at /Users/eslamwael/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (5 weeks ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/eslamwael/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/eslamwael/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915915-b509.11)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.14.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version unknown)
    • Android Studio at /Applications/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 21.0.3+-77717978-b509.4)

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /Applications/Android Studio.app
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915915-b509.11)

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio AI-221.6008.13.2211.9477386.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Community Edition (version 2024.1.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.61.0)
    • VS Code at /Users/eslamwael/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Network resources
    • All expected network resources are available.

How to reproduce?

Create a new Flutter project and add the plugin or the old project with gradle cleaning.

Logs

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':photo_manager:compileDebugKotlin'.
> Error while evaluating property 'compilerOptions.jvmTarget' of task ':photo_manager:compileDebugKotlin'.
   > Failed to calculate the value of property 'jvmTarget'.
      > Unknown Kotlin JVM target: 21

Example code (optional)

No response

Contact

No response

@eslamwael74
Copy link
Author

PR for the bug
#1203

@AlexV525
Copy link
Member

Could you provide your runtime environment? We didn't reproduce this with the example and the latest Android Studio.

@vinurs

This comment was marked as duplicate.

@fealaure

This comment was marked as duplicate.

@gabrielginter
Copy link

Anyone having this issue, this might help: #1198 (comment)

@AlexV525
Copy link
Member

Closing. See #1198 (comment) for the solution.

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants