Malvin Sutanto
10/31/2019, 7:43 AMisDefault flag.
I tried isDefault.set(true) but getting Unresolved reference error.
isDefault itself is marked as private in BuildType class.
Has anybody encountered the same issue before?Malvin Sutanto
10/31/2019, 7:47 AMproductFlavors block looks like this:
productFlavors {
create("qa") {
dimension = "environment"
isDefault.set(true)
applicationIdSuffix = ".$name"
}
...
}mbonnin
10/31/2019, 9:36 AMsetDefault()?Malvin Sutanto
10/31/2019, 9:39 AMsetIsDefault but invoking that method also throws Unresolved reference errorMalvin Sutanto
10/31/2019, 9:41 AMthis::class.java.methods and I can see both getIsDefault and setIsDefault presentmbonnin
10/31/2019, 1:55 PMgetIsDefault().set(true)mbonnin
10/31/2019, 2:02 PMProperty and can set it without you having to call .setMalvin Sutanto
11/01/2019, 1:37 AMgetIsDefault().set(true) as well, but still getting UnresolvedReference error. I printed out the class name, and it showed me ProductFlavor_Decorated 🤔gildor
11/01/2019, 1:46 AMshowed meIt’s fine, this is how Gradle extension workProductFlavor_Decorated
Malvin Sutanto
11/01/2019, 1:49 AMgildor
11/01/2019, 1:50 AMgildor
11/01/2019, 1:51 AMMalvin Sutanto
11/01/2019, 1:52 AMMalvin Sutanto
11/01/2019, 1:54 AMgetIsDefault declared in ProductFlavor class and AS can refer to the method correctly, but it throws Unresolved Reference error when I try to do a gradle syncgildor
11/01/2019, 1:58 AMMalvin Sutanto
11/01/2019, 2:01 AMgradlew build but same ^ Unresolved reference errorMalvin Sutanto
11/01/2019, 2:31 AMthis::class.java.getMethod("getIsDefault") tells me that the method does existgildor
11/01/2019, 2:33 AMgildor
11/01/2019, 2:33 AMgildor
11/01/2019, 2:34 AMgildor
11/01/2019, 2:34 AMMalvin Sutanto
11/01/2019, 2:45 AMMalvin Sutanto
11/01/2019, 2:46 AMgildor
11/01/2019, 2:47 AMprintln(com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION)Malvin Sutanto
11/01/2019, 2:54 AM3.6.0-beta01gildor
11/01/2019, 2:57 AMMalvin Sutanto
11/01/2019, 3:13 AMMalvin Sutanto
11/01/2019, 3:17 AM