2

I'm encountering an issue with my Flutter app and could really use some assistance. Here are the details:

Problem: I'm facing a build failure with the following error message:

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in D:home_page_design\build\flutter_inappwebview\outputs\mapping\release\missing_rules.txt.
ERROR: R8: Missing class android.window.BackEvent (referenced from: void io.flutter.view.FlutterView.startBackGesture(android.window.BackEvent) and 1 other context)

FAILURE: Build failed with an exception.

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

Additional Details:

This error occurs during the execution of assembleRelease in Gradle. I've tried running with --stacktrace but need help interpreting the output.

Steps I've Taken:

Updated Flutter and all dependencies. Cleaned and rebuilt the project. Verified all configurations are correct.

What I'm Seeking:

Any insights into what might be causing this issue? Suggestions on how to resolve or further diagnose the problem? Has anyone encountered a similar issue with Flutter InAppWebView and found a solution?

1
  • Can you share your pubspec.yaml file? Commented Jul 8, 2024 at 13:40

2 Answers 2

0

Since you have not provided your pubspec.yaml file so I can only assume you are using one of the latest version of Flutter and also of flutter flutter_inappwebview.

There is an issue open on flutter_inappwebview's repository which seems very similar to the one you have posted.

There are several suggestions there on how to resolve it.

The last comment there, suggests to add this line at the beginning of the build.gradle file:

project.gradle.startParameter.excludedTaskNames.add(":flutter_inappwebview:minifyReleaseWithR8")
Sign up to request clarification or add additional context in comments.

4 Comments

Here is code of pubspec.yaml file environment: sdk: '>=3.2.3 <4.0.0' dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 get: ^4.6.6 get_storage: ^2.1.1 flutter_screenutil: ^5.9.0 carousel_slider: ^4.2.1 form_field_validator: ^1.1.0 curved_navigation_bar: ^1.0.3 expansion_tile_card: ^3.0.0 image_picker: ^1.0.7 dropdown_button2: ^2.3.7 material_tag_editor: ^0.1.2 . choice: ^2.3.0 google_sign_in: ^6.2.1 . http: ^1.2.0
another_flushbar: ^1.12.30 # For get fcm token. firebase_messaging: ^14.7.15 firebase_core: ^2.28.0 # For using date variable. intl: ^0.19.0 # For using mesibo chat. mesibo_flutter_sdk: ^2.2.5 # For using live agent chat. #flutter_tawk: ^0.1.0 flutter_tawkto: ^0.0.3 # For handling the otp field. pinput: ^4.0.0 # For the toast msg use. fluttertoast: ^8.2.5 # For use the lunch URL. url_launcher: ^6.2.6
dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^2.0.0 assets: - assets/images/ fonts: - family: Exo2 fonts: - asset: assets/fonts/Exo2-Regular.ttf - family: Roboto fonts: - asset: assets/fonts/Roboto-Regular.ttf
@PiyushSahu - Please edit your question to include the pubspec.yaml file contents in it instead of adding several comments to the answer. Also, if my answer helped you, please mark it as such.
0

Try adding this to dependency_overrides.

dependency_overrides:
  flutter_inappwebview_android:
    git:
      url: https://github.com/holzgeist/flutter_inappwebview
      path: flutter_inappwebview_android
      ref: d89b1d32638b49dfc58c4b7c84153be0c269d057

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.