GPH
GPH

Reputation: 1171

Flutter app Android studio 3.2.1, build fail

I updated Android studio to 3.2.1 and run 'flutter build apk' in terminal of Mac, it shows below error. I was able to build apk successfully before updated Android studio.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details

here with my proguard-rules.pro

#Flutter Wrapper
-keep class io.flutter.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.**  { *; }
-keep class com.google.firebase.** { *; }

Upvotes: 3

Views: 1143

Answers (2)

KabataMacharia
KabataMacharia

Reputation: 51

This fixed my issue,

 #Flutter Wrapper
-keep class io.flutter.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.**  { *; }
-dontwarn android.**

Check explanation here: https://github.com/flutter/flutter/issues/40218#issuecomment-531047713

Upvotes: 1

Denis John
Denis John

Reputation: 1

Goto android/app/build.gradle and try minifyEnabled false it should work

Upvotes: 0

Related Questions