flutter_inappwebview icon indicating copy to clipboard operation
flutter_inappwebview copied to clipboard

Build error with latest flutter/agp versions

Open holzgeist opened this issue 2 months ago • 12 comments

  • [x] I have read the Getting Started section
  • [x] I have already searched for the same problem

Environment

Technology Version
Flutter version 3.22
Plugin version 1.0.13
Android version 14
iOS version --
macOS version --
Xcode version --
Google Chrome version --
Android Gradle Plugin 8.4.0

Device information: irrelevant, as this is a build error

Description

Expected behavior:

Be able to compile an app on Android using this plugin with obfuscation/minification

Current behavior:

Build error during minification:

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in .../build/flutter_inappwebview_android/outputs/mapping/release/missing_rules.txt.
ERROR: R8: Missing class android.window.BackEvent (referenced from: void io.flutter.embedding.android.FlutterActivity.startBackGesture(android.window.BackEvent) and 3 other contexts)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_inappwebview_android:minifyReleaseWithR8'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
   > Compilation failed to complete

Steps to reproduce

  1. Depend on flutter_inappwebview
  2. Upgrade to latest flutter/AGP/...
  3. Do a release build with minification (e.g. flutter build apk --obfuscate --split-debug-info /tmp/debug-info. Alternatively, skip --obfuscate --split-debug-info ... and set minifyEnabled true in android/app/build.gradle

holzgeist avatar May 14 '24 09:05 holzgeist