7

Ran into this unhelpful error message while building a release build:

Execution failed for task ':app:processProductionReleaseMetadata'.
> The value for this property cannot be changed any further.
  • And that's it, that's the whole error message. Nothing else to go on.
  • Note that here "Production" is the productFlavor and "Release" is the build type. (I emptied out the configurations for both productFlavor and buildType so these blocks are empty and still getting this error)
  • The dev builds are working fine
  • Tried, cleaning/invalidating caches/restarting/re-installing AS/Gradle - still nothing

I recently updated this android app after one year, upgraded to Android 4.1, latest gradle, plugin versions, libraries etc. So, somewhere something is screwing up this "processMetadata" task.

Any ideas? Where could this be coming from? Manifest? Conflicting dependencies? Some incompatible configuration? Too recent version of AS/Gradle?

I'm on: Android 4.1, Gradle 6.7, Gradle plugin 4.1.1

Aditya Anand
  • 776
  • 2
  • 9
  • 29
  • That is a problem with a plugin or your build files. The error means something is trying to change task property value during the execution phase (the properties are supposed to be set during the configuration phase prior task execution). Try to execute the build with `--stacktrace` option to find out more. – esentsov Nov 25 '20 at 18:58
  • Have you checked your proguard? – Ticherhaz FreePalestine Dec 02 '20 at 07:13

1 Answers1

-1

Had the same issue on a flutter project this worked out for me. Had to downgrade gradle to 3.5.0. Apparently you are not supposed to upgrade gradle for flutter application

classpath 'com.android.tools.build:gradle:3.5.0' in your build.gradle file

Amir Heshmati
  • 550
  • 1
  • 8
  • 19