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

[Bug report] Fluuter 3.24.5 version will report an error after installing flutter_photo_manager #1241

Closed
wozailashi94 opened this issue Dec 7, 2024 · 3 comments

Comments

@wozailashi94
Copy link

Version

photo_manager: ^3.6.3

Platforms

Android

Device Model

Android 35

flutter info

[√] Flutter (Channel stable, 3.24.5, on Microsoft Windows [版本 10.0.19045.5131], locale zh-CN)
    • Flutter version 3.24.5 on channel stable at C:\Users\admin\fvm\versions\3.24.5
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dec2ee5c1f (3 weeks ago), 2024-11-13 11:13:06 -0800
    • Engine revision a18df97ca5
    • Dart version 3.5.4
    • DevTools version 2.37.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\admin\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: D:\android studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11) 
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default    
      components

[√] Android Studio (version 2024.2)
    • Android Studio at D:\android studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)

[√] Connected device (4 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 15 (API 35)
      (emulator)
    • Windows (desktop)            • windows       • windows-x64    • Microsoft Windows [版本     
      10.0.19045.5131]
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 131.0.6778.109    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 131.0.2903.51

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

! Doctor found issues in 1 category.

How to reproduce?

After directly creating the flutter apAfter directly creating the flutter application, install the library and run it in the debug mode of vscode.plication, install the library and run it in the debug mode of vscode.

Logs

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...

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

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 11s
Error: Gradle task assembleDebug failed with exit code 1

Exited (1).

Example code (optional)

No response

Contact

No response

@fluttercandies-dev
Copy link

AI Summary: 用户在使用 Flutter 3.24.5 版本并安装 photo_manager 3.6.3 后,在 Android 平台上构建时,由于 Kotlin JVM target 21 不被识别,导致编译失败。

@wozailashi94
Copy link
Author

how can i solve

@AlexV525
Copy link
Member

AlexV525 commented Dec 7, 2024

Duplicate of #1198

@AlexV525 AlexV525 marked this as a duplicate of #1198 Dec 7, 2024
@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 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

3 participants