Flutter Build failed with an exception. What went wrong: Execution failed for task ':flutter_inappwebview:minifyReleaseWithR8'

105 Views Asked by At

I am getting this error when compiling a release using Flutter

FAILURE: Build failed with an exception.
[   +1 ms] * What went wrong:
[        ] Execution failed for task ':flutter_inappwebview:minifyReleaseWithR8'.
[        ] > java.util.zip.ZipException: zip END header not found

However compiling a debug apk works perfectly fine. I have tried every possibly solutions I came across to do with deleting and reinstalling gradle nothing works.

Flutter fix suggests this:

[!] The shrinker may have failed to optimize the Java bytecode.            │
│ To disable the shrinker, pass the `--no-shrink` flag to this command.      │
│ To learn more, see: https://developer.android.com/studio/build/shrink-code 

It seems that the R8 could be causing the problem but when I try to compile with --no-shrink it is totally ignored it's still attempts to minify with R8.

Any suggestions will be greatly appreciated

I tried to disable minify in order to compile without shrinking but it is still uses the R8 to minify

0

There are 0 best solutions below