Update proguard-rules.pro
Connection with issue(s)
Resolve issue:
ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /Users/manishpatel/Documents/gen3/iv-pro-mobile/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)
Connected to:
The latest master channel in flutter gives the above error.
Testing and Review Notes
Screenshots or Videos
To Do
- [ ] double check the original issue to confirm it is fully satisfied
- [ ] add testing notes and screenshots in PR description to help guide reviewers
- [ ] request the "UX" team perform a design review (if/when applicable)
Hello, I was wondering if this could get merged in shortly, this is holding up using the newest Android Gradle
Hello, I was wondering if this could get merged in shortly, this is holding up using the newest Android Gradle
It would be really great if it can be done asap. As it is a blocking issue.
Workaround pubspec.yaml
dependency_overrides:
# TODO: Check once flutter_inappwebview version >6.0.0 is released
flutter_inappwebview_android:
git:
url: [email protected]:YOUR_FORK_WITH_FIX/flutter_inappwebview.git
path: flutter_inappwebview_android
ref: YOUR_LAST_COMMIT_ID
@pichillilorenzo Could we get this merged in and released?
As a workaround, you can add Proguard rules to ignore or exclude what is causing the warning from minimization.
Run:
./gradlew build
Go to the warnings section, and ignore the warning:
-dontwarn android.window.BackEvent
You will need to include it in proguard.pro or proguard-rules.pro (depending on Gradle configuration)
Of the app project itself instead.
See Proguard Manual Usage and Proguard Manual Home for more details.
[!NOTE] This suggestion provides a hint to fix the issue, I haven't seen the full output or what causes the issue, though I'm pretty sure it's possible to fix it without changes from the plugin itself.
Also noticed the rules fully exclude the plugin from minimization. It might be because all methods and classes are all required, though still it's possible to minimize the bundle size further.
https://github.com/pichillilorenzo/flutter_inappwebview/pull/2231