1 00:00:00,300 --> 00:00:02,680 There's a couple more things about Android Build Variants that you should 2 00:00:02,680 --> 00:00:05,370 know about, but you won't necessarily need to use them very often. 3 00:00:06,440 --> 00:00:09,650 Consider a game that contains a great deal of drawable resources. 4 00:00:09,650 --> 00:00:12,160 So many in fact that including all the drawables for 5 00:00:12,160 --> 00:00:14,910 every resolution would result in an unacceptably large APK. 6 00:00:14,910 --> 00:00:19,840 This would be an excellent time to use product flavors, one for medium DPI and 7 00:00:19,840 --> 00:00:21,480 one for high DPI. 8 00:00:21,480 --> 00:00:25,310 Now, consider what happens if we want to add free and paid flavors. 9 00:00:25,310 --> 00:00:28,730 You'll want both a free and paid medium DPI version, and a free and 10 00:00:28,730 --> 00:00:30,440 paid high DPI version. 11 00:00:30,440 --> 00:00:32,750 This comes out to four total flavors. 12 00:00:32,750 --> 00:00:35,720 However, now if you want to include additional functionality in 13 00:00:35,720 --> 00:00:39,630 the paid version, for example, you have to put it in two places. 14 00:00:39,630 --> 00:00:44,140 One for the paid medium DPI and one for the paid high DPI. 15 00:00:44,140 --> 00:00:47,050 Now, suddenly we've lost all the code release advantages of 16 00:00:47,050 --> 00:00:49,310 using flavors in the first place. 17 00:00:49,310 --> 00:00:52,140 Fortunately, the Android plug-in supports the concept of flavor 18 00:00:52,140 --> 00:00:54,500 dimensions to deal with this use case. 19 00:00:54,500 --> 00:00:56,410 Just like the Android plug-in will create tasks for 20 00:00:56,410 --> 00:00:58,780 each combination of build type and product flavor. 21 00:00:58,780 --> 00:01:02,310 You will now be able to build every possible permutation build type, 22 00:01:02,310 --> 00:01:04,349 product flavor, and flavor dimension.