I am in the process of importing a Dynamic Library project (created by Projucer), into an Android Studio project (via New -> Import Module)
I have got the thing building, but when I try and run it I am hitting this error:
Cannot choose between the following variants of project :../MyLib/Builds/Android/lib:
- debug_DebugApiElements
- release_DebugApiElements
All of them match the consumer attributes:
- Variant 'debug_DebugApiElements':
- Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
- Found com.android.build.api.attributes.VariantAttr 'debug_Debug' but wasn't required.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
- Found default 'debug_' but wasn't required.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' but no value provided.
- Variant 'release_DebugApiElements':
- Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
- Found com.android.build.api.attributes.VariantAttr 'release_Debug' but wasn't required.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
- Found default 'release_' but wasn't required.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' but no value provided.
@fabian @ed95 do you have any clues?
My main project’s build.gradle
includes both debug
and release
in buildTypes