https://kotlinlang.org logo
#android
Title
# android
e

eygraber

07/01/2022, 2:27 PM
I'm using AGP 7.4.0-alpha07 and upgrading from Kotlin 1.6.21 to 1.7.0 and I'm getting the following error when running lint:
Copy code
FAILURE: Build failed with an exception.

* What went wrong:

Configuration cache problems found in this build.

3 problems were found storing the configuration cache, 1 of which seems unique.

 - Task `:app:buildKotlinToolingMetadata` of type `org.jetbrains.kotlin.gradle.tooling.BuildKotlinToolingMetadataTask$FromKotlinExtension`: invocation of 'Task.project' at execution time is unsupported.
Anyone run into this?
Maybe the configuration cache issue is a red herring? A build scan shows the following failures for all
<variant>ImplementationDependenciesMetadata
tasks (that weren't in the stdout logs):
Copy code
Deprecations
Timeline
Performance
Tests
Projects
Dependencies
Build dependencies
Plugins
Switches
Infrastructure
Delete Build Scan
723 dependencies resolved in 171 projects across 2594 configurations from 7 repositories, 156 dependencies failed to resolve
The consumer was configured to find a usage of 'kotlin-metadata' of a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common'. However we cannot choose between the following variants of project :android:
  - devDebugApiElements
  - devReleaseApiElements
  - prodDebugApiElements
  - prodReleaseApiElements
All of them match the consumer attributes:
  - Variant 'devDebugApiElements' capability myapp:android:unspecified declares an API of a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
      - Unmatched attributes:
          - Provides attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.4.0-alpha07' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.api.attributes.ProductFlavor:environment' with value 'dev' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'devDebug' but the consumer didn't ask for it
          - Provides attribute 'environment' with value 'dev' but the consumer didn't ask for it
          - Provides attribute 'org.gradle.jvm.environment' with value 'android' but the consumer didn't ask for it
  - Variant 'devReleaseApiElements' capability covid19-android:android:unspecified declares an API of a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
      - Unmatched attributes:
          - Provides attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.4.0-alpha07' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.api.attributes.ProductFlavor:environment' with value 'dev' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'devRelease' but the consumer didn't ask for it
          - Provides attribute 'environment' with value 'dev' but the consumer didn't ask for it
          - Provides attribute 'org.gradle.jvm.environment' with value 'android' but the consumer didn't ask for it
  - Variant 'prodDebugApiElements' capability covid19-android:android:unspecified declares an API of a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
      - Unmatched attributes:
          - Provides attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.4.0-alpha07' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.api.attributes.ProductFlavor:environment' with value 'prod' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'prodDebug' but the consumer didn't ask for it
          - Provides attribute 'environment' with value 'prod' but the consumer didn't ask for it
          - Provides attribute 'org.gradle.jvm.environment' with value 'android' but the consumer didn't ask for it
  - Variant 'prodReleaseApiElements' capability covid19-android:android:unspecified declares an API of a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
      - Unmatched attributes:
          - Provides attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.4.0-alpha07' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.api.attributes.ProductFlavor:environment' with value 'prod' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'prodRelease' but the consumer didn't ask for it
          - Provides attribute 'environment' with value 'prod' but the consumer didn't ask for it
          - Provides attribute 'org.gradle.jvm.environment' with value 'android' but the consumer didn't ask for
10 Views