我将Android Studio更新为3.2.1,并在Mac的终端中运行“ flutter build apk”,它显示以下错误。我能够在更新Android Studio之前成功构建apk。
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details
这里有我的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.** { *; }
转到android / app / build.gradle并尝试minifyEnabled false
它应该可以工作