Skip to content

Facing :app:minifyDevReleaseWithR8 issue when minifyEnabled is equal to true #73

@Abdullatif-Eida

Description

@Abdullatif-Eida

After adding this line to my gradle

apply from: project(':flutter_config').projectDir.getPath() + "/dotenv.gradle"

I started to face an issue regard the minifyEnabled when run flutter build apk --flavor prod --release that says

Execution failed for task ':app:minifyProdReleaseWithR8'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
   > Compilation failed to complete, origin: /pathTo/build/app/intermediates/merged_java_res/prodRelease/base.jar

Also my proguard-rules.pro file has

-keep class com.packagename.BuildConfig { *; }
-keep class com.wpackagename.dev.BuildConfig { *; }
-keep class com.wpackagename.stage.BuildConfig { *; }

Note: when make minifyEnabled = false everything works fine but I want to keep the minifyEnabled=true

so anyone has any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions