After upgrading android studio to Chipmunk Patch 1...
# multiplatform
j
After upgrading android studio to Chipmunk Patch 1, Gradle to version 7.4.2 and android gradle plugin to version 7.2.1 I started getting these warnings: Unable to build Kotlin project configuration
Copy code
org.gradle.internal.component.AmbiguousVariantSelectionException: The consumer was configured to find an API of a component, preferably optimized for Android, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'. However we cannot choose between the following variants of project :common:
  - Configuration ':common:debugApiElements' variant android-aidl declares an API of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
      - Unmatched attributes:
          - Provides attribute 'artifactType' with value 'android-aidl' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.2.1' but the consumer didn't ask for it
          - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
Am I doing something wrong?
is it a thread now?
m
Need to remove all the stack trace and code out of the original message so that it is smaller
e
Use code blocks. Don’t paste code as plain text.
👍 1
if you can't find the "post snippet" button (Slack doesn't provide it on mobile and some redesigns have hidden it on desktop), then at least post it in a subthread so it doesn't clutter up the main channel
👍 1
j
Thanks for explanation, is it ok now?
🚫 1
e
a huge code block is still in the main channel
h
BTW: this code snippet does not help, because it should work. Could you provide the versions, or better the project?
e
the problem may possibly in the project using common, not common itself. so it would be best if you could remove the code blocks in the first message, and post all the relevant details in messages within the thread
j
Android Studio Chipmunk | 2021.2.1 Patch 1 Android gradle plugin 7.2.1 Gradle 7.4.2
configuration of module using common:
e
hard to tell without the complete error and common build script as well, but first guess is that this can happen if common doesn't have a debug buildType and the consumer doesn't have matchingFallbacks set
by the way, both this situation and any other cases the future, the first step you should take is to make a mcve. this will both help you debug the issue, and if it fails, to make it easier responders to spot a problem and verify a solution
👍 1
j