Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease' flutter.
In debug mode, my flutter app is perfectly running and no issues there. after debugging, I went to make
build of my flutter app but I got this error and the build failed.
After some research, I got the solution and implemented it after this my flutter app build was successfully completed.
The problem is I do not have proguard file in my proguard file. I created a proguard file in the project/android/app folder. but doing this I get the same error then I add some line at the proguard file and my error is solved and the build successfully completed.
I want to share this solution with you.
If you get this error. First, check the project you have proguard file in the project/android/app folder. if you do not have a file then create proguard file and insert it:
#Flutter Wrapper
-keep class io.fluter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
At the end add these lines for the solution shown below:
-ignorewarnings
-keep class * {
public private *;
}
After doing this process my error is gone and the build is successfully complete.
For more information on packages, widgets and solutions take a dive into the FlutterStuff.