flutter_inappwebview icon indicating copy to clipboard operation
flutter_inappwebview copied to clipboard

Execution failed for task ':flutter_inappwebview_android:minifyReleaseWithR8'.

Open LScodeblack opened this issue 1 year ago • 26 comments

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

Environment

Technology Version
Flutter version
Plugin version
Android version
iOS version
macOS version
Xcode version
Google Chrome version

Device information:

Description

Expected behavior:

Current behavior:

Steps to reproduce

  1. This
  2. Than that
  3. Then

Images

Stacktrace/Logcat

LScodeblack avatar Jun 21 '24 07:06 LScodeblack

👋 @LScodeblack

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

github-actions[bot] avatar Jun 21 '24 07:06 github-actions[bot]

Any luck with this? flutter version: 3.22.2 Android: SDK version 35.0.0 Plugin version: 6.0.0 I have found that flutter run works fine, butflutter build apk and flutter build appbundle throws this error

ChrisElliotUK avatar Jun 25 '24 15:06 ChrisElliotUK

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

* 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 5s

ChrisElliotUK avatar Jun 25 '24 16:06 ChrisElliotUK

Exact same problem here

mynlexi avatar Jun 26 '24 13:06 mynlexi

Also i have this problem

Igor-Pavlyshyn avatar Jun 26 '24 14:06 Igor-Pavlyshyn

I also have this problem

marvinJ10 avatar Jun 27 '24 09:06 marvinJ10

Same issue here.

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

chiragaavitech avatar Jul 01 '24 10:07 chiragaavitech

Same here.

guiwestrup avatar Jul 01 '24 13:07 guiwestrup

Me too

chplALEX avatar Jul 03 '24 06:07 chplALEX

I got around this by adding flutter_inappwebview_android to the dependency_overrides

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

ChrisElliotUK avatar Jul 04 '24 10:07 ChrisElliotUK

Me too

agarwalrohit2503 avatar Jul 09 '24 18:07 agarwalrohit2503

hi @ChrisElliotUK , any update on this? thank you

dependency_overrides: flutter_inappwebview_android: git: url: https://github.com/holzgeist/flutter_inappwebview path: flutter_inappwebview_android ref: d89b1d32638b49dfc58c4b7c84153be0c269d057 ..... it works for me

ritzqureshi avatar Jul 10 '24 08:07 ritzqureshi

same error here, please provide a fix

DurgeshSawantWYLD avatar Jul 10 '24 11:07 DurgeshSawantWYLD

@DurgeshSawantWYLD please provide the error with screenshot

ritzqureshi avatar Jul 10 '24 11:07 ritzqureshi

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

  • 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 2m 9s

Eng-Yuri89 avatar Jul 12 '24 01:07 Eng-Yuri89

@DurgeshSawantWYLD please provide the pubspec.yaml

ritzqureshi avatar Jul 12 '24 05:07 ritzqureshi

Same issue, Please fix it

bibek-ranjan-saha avatar Jul 15 '24 00:07 bibek-ranjan-saha

@DurgeshSawantWYLD please provide the pubspec.yaml file or you can add this line after dependencies dependency_overrides: flutter_inappwebview_android: git: url: https://github.com/holzgeist/flutter_inappwebview path: flutter_inappwebview_android ref: https://github.com/pichillilorenzo/flutter_inappwebview/commit/d89b1d32638b49dfc58c4b7c84153be0c269d057

ritzqureshi avatar Jul 15 '24 06:07 ritzqureshi

It resolves the issue. Thank you @ChrisElliotUK

I got around this by adding flutter_inappwebview_android to the dependency_overrides

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

chplALEX avatar Jul 18 '24 06:07 chplALEX

Im facing same issue.

Tolulope05 avatar Jul 24 '24 12:07 Tolulope05

Me too

JoseBarreto1 avatar Aug 02 '24 14:08 JoseBarreto1

Same error

euferreira avatar Aug 02 '24 14:08 euferreira

Me too facing same issue

ZunairImtiaz08 avatar Aug 09 '24 11:08 ZunairImtiaz08

I created a temporary package until this problem is resolved here. Maybe it will help some people: https://pub.dev/packages/webview_inapp

JoseBarreto1 avatar Aug 09 '24 11:08 JoseBarreto1

I am facing this issue too. But this fixed it for now. I hope the owner releases an update soon.

I got around this by adding flutter_inappwebview_android to the dependency_overrides

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

imaduddinmd avatar Aug 12 '24 07:08 imaduddinmd

any update @pichillilorenzo ? this issue still persistence in flutter SDK 3.22.3. Please solve this issue and release a new version. Thanks.

plchekspend avatar Aug 27 '24 04:08 plchekspend

Facing the same issue.

FYI - @pichillilorenzo

MakSinroja avatar Aug 27 '24 12:08 MakSinroja

Same issue on Flutter 3.24.1

Den-creator avatar Aug 28 '24 16:08 Den-creator

same here work fine with run but bruild release don't work

yelkamel avatar Aug 30 '24 14:08 yelkamel