Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

apk build.gradle error - All flavors must belong to a named flavor dimension. #240

Closed
tombirmingham opened this issue Aug 22, 2017 · 11 comments

Comments

@tombirmingham
Copy link

Getting this error on build:

Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html

@bernaferrari
Copy link

Use Android Studio 2.3.3 and they will disappear.

@felix-antony
Copy link

felix-antony commented Oct 10, 2017

You might be facing this kind of issue when you upgrade to Android Gradle plugin 3.0.0
Please refer this android developer page to resolve certain issues, and right configuration : https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html

@rodydavis
Copy link

Using Android Studio 3.0.1 and having the same issue

@GeethaLakha
Copy link

You can try by providing flavor dimensions for the productFlavors. It worked for me.
for ex:
flavorDimensions "tier", "minApi"
productFlavors{
link1{
dimension 'tier'
------------------------
}
link2{
dimension 'minApi'
------------------------
}
}

@viral7chauhan
Copy link

Thanks @GeethaLakha

@jitendar7
Copy link

Thanks @GeethaLakha , it worked for me

@zainyaseen
Copy link

Having the same problem, Please tell how to fix it.

Thank you.

@Lemmynjash
Copy link

Having the same problem

@codeAndxv
Copy link

@ghost
Copy link

ghost commented Jul 28, 2018

In which file please ? There's several "build.gradle"
In advance thanks

@JoseAlcerreca
Copy link
Contributor

Obsolete after the 2018 version rewrite.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests