-
Notifications
You must be signed in to change notification settings - Fork 212
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
The shrinker may have failed to optimize the Java bytecode. #353
Comments
I encountered the same error and upgrading Gradle, as suggested, led to numerous other library issues. |
I am also facing same issue, could any please tell me the package version don't having this issue. |
same issue |
I reverted to Java 8. |
@llfbandit tried applying record_android from git. This works fine. |
Guys make sure to do this. https://github.com/llfbandit/record/blob/master/record_android/README.md |
@zhengguo07q can you confirm too before publishing new version? |
@llfbandit FAILURE: Build failed with an exception.
BUILD FAILED in 1m 57s no , I attempted to upgrade to compileSdk = 34 and applied id "com.android.application" version "7.4.2" with apply false, but encountered issues nonetheless. |
works with master version @llfbandit when do you think that you can release a new version ? |
This helped! Thanks |
Package version
record: ^5.1.2
Environment
Describe the bug
On adding the plugin to dependency and adding the required permissions, i am unable to run the app.
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.1 23B2073 darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.89.1)
[✓] Connected device (4 available)
[✓] Network resources
Additional context
ERROR:/Users/hussainint/Desktop/fluttercode/doct/build/record_android/intermediates/runtime_library_classes_jar/debug/classes.jar: D8: com.android.tools.r8.internal.Hc: Sealed classes are not supported as program classes
FAILURE: Build failed with an exception.
Execution failed for task ':app:mergeLibDexDebug'.
BUILD FAILED in 2s
Running Gradle task 'assembleDebug'... 3.2s
┌─ 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
The text was updated successfully, but these errors were encountered: