1

We are trying to upgrade our Android Project to use Android Gradle Plugin 4.2.1 or 4.2.0, but when I do this I get the following error:

Caused by: java.lang.IllegalStateException: The value for property 'resValues' cannot be changed any further.
        at org.gradle.api.internal.provider.AbstractProperty$NonFinalizedValue.beforeMutate(AbstractProperty.java:386)
        at org.gradle.api.internal.provider.AbstractProperty.assertCanMutate(AbstractProperty.java:263)
        at org.gradle.api.internal.provider.DefaultMapProperty.addCollector(DefaultMapProperty.java:176)
        at org.gradle.api.internal.provider.DefaultMapProperty.put(DefaultMapProperty.java:149)
        at com.android.build.api.variant.impl.VariantImpl.addResValue(VariantImpl.kt:104)
        at com.android.build.gradle.internal.api.BaseVariantImpl.resValue(BaseVariantImpl.java:646)
        at com.heapanalytics.android.gradle.HeapPlugin.postAGPApply(HeapPlugin.java:470)

I'm unsure if this means that the latest Heap Android SDK is incompatible with the latest AGP version or if our project has an odd setting that must be fixed. Any help would be appreciated. We are currently using Heap Android SDK 1.8.1 but even with the latest Heap Android SDK we receive the same error(1.9.1).

Marco RS
  • 8,145
  • 3
  • 37
  • 45
  • Nora from Heap support here! Our mobile team has prioritized this issue and is actively working on a release version with support for Android Studio 4.2. The current release timeline for the supported version is by the end of this June. In the future, if you ever run into questions about Heap or encounter any issues please feel free to reach out to support@heapanalytics.com. – Nora May 27 '21 at 20:19

1 Answers1

1

Heap just updated their SDK to 1.9.2 which should now allow for using the Android Gradle Plugin 4.2.1. At least, this is now working in my project.