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

ERROR:/Users/han/Desktop/bao_im_client/build/photo_manager/intermediates/runtime_library_classes_jar/debug/classes.jar: R8: com.android.tools.r8.internal.Hc: Unsupported class file version: 62 #1252

Closed
simanlx opened this issue Dec 26, 2024 · 3 comments

Comments

@simanlx
Copy link

simanlx commented Dec 26, 2024

Version

3.0-3.6

Platforms

Android

Device Model

31

flutter info

: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:minifyDebugWithR8'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
   > Compilation failed to complete, origin: /Users/han/Desktop/bao_im_client/build/photo_manager/intermediates/runtime_library_classes_jar/debug/classes.jar:com/flutterandies/photo_manager/BuildConfig.class

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* 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 5m 31s

┌─ Flutter Fix ──────────────────────────────────────────────────────────────┐
│ [!] The shrinker may have failed to optimize the Java bytecode.            │
│ To disable the shrinker, pass the `--no-shrink` flag to this command.      │
│ To learn more, see: https://developer.android.com/studio/build/shrink-code │
└────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1

How to reproduce?

各种手段都用了。换java gradle 和饿photo_manage

Logs

/Users/han/Desktop/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel stable, 3.24.0, on macOS 13.7.1 22H221 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.24.0 on channel stable at /Users/han/Desktop/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 80c2e84975 (5 months ago), 2024-07-30 23:06:49 +0700
    • Engine revision b8800d88be
    • Dart version 3.5.0
    • DevTools version 2.37.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/han/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Users/han/Library/Java/JavaVirtualMachines/corretto-18.0.2/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment Corretto-18.0.2.9.1 (build 18.0.2+9-FR)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.16.2

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

[✓] 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
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915915-b509.11)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.1)
    • IntelliJ at /Applications/IntelliJ IDEA.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

Example code (optional)

1

Contact

No response

@simanlx
Copy link
Author

simanlx commented Dec 26, 2024

I am in the process of upgrading from Flutter3.12 to 3.24

@fluttercandies-dev
Copy link

AI Summary: 该用户在使用 photo_manager 库时,Android 构建失败。原因是 R8 无法处理版本号为 62 的 class 文件,导致编译无法完成。

@AlexV525
Copy link
Member

Duplicate of #1248

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