The `postProcessing` block cannot be used with together with the `setMinifyEnabled` method

Viewed 116

I've just learned that we can use postprocessing block instead of the old way of using "setMinifyEnabled" to control the obfuscation of our code, so I added the following to build.gradle in release config

    buildTypes {
        release {
            postprocessing {
                removeUnusedCode true
                removeUnusedResources true
                obfuscate false
                optimizeCode true
            }

            signingConfig signingConfigs.release
        }
    }

But Android studio shows me this error when I try "flutter build apk --split-per-abi"

The postProcessing block cannot be used with together with the setMinifyEnabled method.

so, how can I solve this problem?

0 Answers
Related