Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':flutter_inappwebview_android:minifyReleaseWithR8'. #2193

Closed
2 tasks done
LScodeblack opened this issue Jun 21, 2024 · 37 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@LScodeblack
Copy link

  • I have read the Getting Started section
  • 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 LScodeblack added the bug Something isn't working label Jun 21, 2024
Copy link

👋 @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!

@ChrisElliotUK
Copy link

ChrisElliotUK commented Jun 25, 2024

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
Copy link

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

@mynlexi
Copy link

mynlexi commented Jun 26, 2024

Exact same problem here

@Igor-Pavlyshyn
Copy link

Also i have this problem

@marvinJ10
Copy link

marvinJ10 commented Jun 27, 2024

I also have this problem

@chiragaavitech
Copy link

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

@guiwestrup
Copy link

Same here.

@chplALEX
Copy link

chplALEX commented Jul 3, 2024

Me too

@ChrisElliotUK
Copy link

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

@agarwalrohit2503
Copy link

Me too

@justatipfromthedeadsequoiatree

hi @ChrisElliotUK , any update on this? thank you

@ritzqureshi
Copy link

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

@DurgeshSawantWYLD
Copy link

same error here, please provide a fix

@ritzqureshi
Copy link

@DurgeshSawantWYLD please provide the error with screenshot

@Eng-Yuri89
Copy link

Eng-Yuri89 commented Jul 12, 2024

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

@ritzqureshi
Copy link

@DurgeshSawantWYLD please provide the pubspec.yaml

@bibek-ranjan-saha
Copy link

Same issue, Please fix it

@ritzqureshi
Copy link

ritzqureshi commented Jul 15, 2024

@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: d89b1d3

@chplALEX
Copy link

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

@Tolulope05
Copy link

Im facing same issue.

@JoseBarreto1
Copy link

Me too

@euferreira
Copy link

Same error

@ZunairImtiaz08
Copy link

Me too facing same issue

@JoseBarreto1
Copy link

JoseBarreto1 commented Aug 9, 2024

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

@imaduddinmd
Copy link

imaduddinmd commented Aug 12, 2024

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

@plchekspend
Copy link

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

@MakSinroja
Copy link

Facing the same issue.

FYI - @pichillilorenzo

@Den-creator
Copy link

Same issue on Flutter 3.24.1

@yelkamel
Copy link

yelkamel commented Aug 30, 2024

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

@plchekspend
Copy link

After January author maybe inactive since today. What should we do?

@HachichaRacem
Copy link

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

This worked, hopefully the issue gets fixed soon

@abdifatahmuse
Copy link

I had the same issue, and I solved this issue after downgrading the com.android.application from 8.1.0 to 7.3.0
also added the proguard-rules in side the

after changes it works the build release

    buildTypes {
        release { 
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

from

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "8.1.0" apply false
    id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}

to

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "7.3.0" apply false
    id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}

@monisnap-jeremie
Copy link

monisnap-jeremie commented Sep 25, 2024

The following fix worked for me:

dependency_overrides:
  flutter_inappwebview_android: 1.0.13

It avoids to fork the main repo.

@pichillilorenzo is any fix release planned?

@pichillilorenzo
Copy link
Owner

Released new flutter_inappwebview_android version 1.1.0+1 with the fix. You can run flutter pub upgrade.

@CodeWithJeet1204
Copy link

d89b1d3

In which file?
Pubspec.yaml ??

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests