flutter_inappwebview
flutter_inappwebview copied to clipboard
Build error with latest flutter/agp versions
- [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
- Depend on flutter_inappwebview
- Upgrade to latest flutter/AGP/...
- 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 setminifyEnabled true
inandroid/app/build.gradle