FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
130 stars 26 forks source link

R8 Shrinker Error When Building AAB in FlutterFlow #4623

Closed 24n1 closed 3 weeks ago

24n1 commented 3 weeks ago

Can we access your project?

Current Behavior

I'm encountering an error while trying to deploy my app to the Google Play Store. When building the AAB, I'm getting the following error:

FAILURE: Build failed with an exception.
Execution failed for task ':app:minifyReleaseWithR8'
> Compilation failed to complete: androidx.media3.exoplayer.dash.manifest.DashManifestParser

The error seems to be related to R8 code optimization with the media3-exoplayer-dash library. The full error message suggests using the --no-shrink flag, but I'm not sure how to implement this in FlutterFlow's deployment process.

Here's the complete error log:

BUILD FAILED in 5m 5s
Running Gradle task 'bundleRelease'...

[!] The shrinker may have failed to optimize the Java bytecode.
To disable the shrinker, pass the --no-shrink flag to this command.

I'm using a custom widget that implements video playback functionality. Has anyone encountered this issue before? Any suggestions on how to resolve this in the FlutterFlow environment would be greatly appreciated.

Expected Behavior

Shoud be deployed to Playstore without any issues as it had been until 2 days ago.

Steps to Reproduce

  1. Created a custom widget using video_player package for HLS video streaming
  2. Implemented the custom widget in my FlutterFlow project
  3. Added video_player: ^2.8.7 to pubspec.yaml dependencies
  4. Attempted to create an AAB for Google Play Store deployment through FlutterFlow
  5. Build fails during the R8 optimization step with the ExoPlayer error mentioned above

Environment:

The error occurs consistently during the build process, specifically at the R8 optimization stage. I believe this is related to how the R8 shrinker is handling the ExoPlayer library that video_player depends on internally.

Reproducible from Blank

Bug Report Code (Required)

The bug is not to any widgets. It is from deployment staging. Here is the full failure message. == FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:minifyReleaseWithR8'. > A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable > Compilation failed to complete, position: Landroidx/media3/exoplayer/dash/manifest/DashManifestParser;parseMediaPresentationDescription(Lorg/xmlpull/v1/XmlPullParser;Landroid/net/Uri;)Landroidx/media3/exoplayer/dash/manifest/DashManifest;, origin: /Users/builder/.gradle/caches/transforms-3/e5b449bce8238ceaa32584bd43717a94/transformed/jetified-media3-exoplayer-dash-1.4.1-runtime.jar:androidx/media3/exoplayer/dash/manifest/DashManifestParser.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. * Get more help at https://help.gradle.org BUILD FAILED in 5m 5s Running Gradle task 'bundleRelease'... 306.6s ┌─ 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 │ └────────────────────────────────────────────────────────────────────────────┘ Gradle task bundleRelease failed with exit code 1 Build failed :| Step 7 script Build AAB with Flutter exited with status code 1

Visual documentation

SmartSelect_20241024_201049_Samsung Internet

Environment

- FlutterFlow version: flutter 3.24.2 (newest)
- Platform: Web
- Browser name and version: (web): Chrome 132.0.6793.2
- Operating system and version affected: Windows 11

Additional Information

Impact and Urgency: This build failure is causing significant business impact:

This is a critical blocker for our service delivery and user satisfaction. Any help or guidance would be greatly appreciated as we need to resolve this issue as soon as possible to maintain our service quality and user base.

Alezanello commented 3 weeks ago

Hello!

I’m sorry you're experiencing this issue. The good news is that it's a known problem, and we're already working on a fix: GitHub Issue #4602. I’ll close this as a duplicate; please refer to the linked issue for any updates!