What is the cause of this error? It happens when I...
# multiplatform
a
What is the cause of this error? It happens when I am have a multiplatform lib dependency
Copy code
> Task :generatePomFileForAndroidReleasePublication FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generatePomFileForAndroidReleasePublication'.
> Could not apply withXml() to generated POM
   > More than one variant of project :klock matches the consumer attributes:
       - Configuration ':klock:releaseApiElements' variant android-aidl:
           - Unmatched attributes:
               - Found artifactType 'android-aidl' but wasn't required.
               - Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
           - Compatible attributes:
               - Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
               - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
               - Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
       - Configuration ':klock:releaseApiElements' variant android-manifest:
           - Unmatched attributes:
               - Found artifactType 'android-manifest' but wasn't required.
               - Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
           - Compatible attributes:
               - Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
               - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
               - Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
       - Configuration ':klock:releaseApiElements' variant android-renderscript:
           - Unmatched attributes:
               - Found artifactType 'android-renderscript' but wasn't required.
               - Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
           - Compatible attributes:
               - Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
               - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
               - Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
       - Configuration ':klock:releaseApiElements' variant android-symbol-with-package-name:
           - Unmatched attributes:
               - Found artifactType 'android-symbol-with-package-name' but wasn't required.
               - Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
           - Compatible attributes:
               - Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
               - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
               - Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at <https://help.gradle.org>

BUILD FAILED in 1s
14 actionable tasks: 1 executed, 13 up-to-date
l
@andylamax You are probably using a multiplatform library which only had its debug variant published. You can vote for this issue and look for its details as workarounds are mentionned (matchingFallbacks) https://youtrack.jetbrains.com/issue/KT-38954