I want to pass a variable test that I set differently per flavor as a define to the NDK. But for some reason he always passes the value of the last flavor.
test
You can use buildConfigField
buildConfigField
productFlavors { demo { buildConfigField "int", "FOO", "1" buildConfigField "String", "FOO_STRING", "\"foo1\"" } full { buildConfigField "int", "FOO", "2" buildConfigField "String", "FOO_STRING", "\"foo2\"" } }