We are doing this as a means to support the new Fire Phone through productFlavors. The Fire Phone has it's own fork of the Android SDK. To support this, we are required to change the compileSdkVersion to point to their downloaded SDK. After further research, I discovered what you said and opened a question <https://groups.google.com/forum/#!topic/adt-dev/OC8c_2r56dg> to see if anyone else has had to deal with this issue. I'm not sure if you've run into this, but any insight is appreciated!
On Thursday, July 24, 2014 12:08:03 AM UTC-7, Jake Wharton wrote: > > As far as I know this isn't going to work nor would supporting it be easy. > The compile SDK version points to the android.jar in the associated folder > of the SDK. This jar is used as the bootclasspath when invoking javac for > which there is only allowed to be one. Since the source files in the flavor > are joined with the source files from the active build type and the main > source tree, having a configuration like this could result in compile SDK > version disagreements for some combinations of these three contributors to > a variant. > > Why do you need this? In practice you should always be compiling with the > latest platform APIs regardless of the API level range for which the > product flavor is targeting. > > > On Tue, Jul 22, 2014 at 5:18 PM, <[email protected] <javascript:>> > wrote: > >> We are trying to dynamically set the compileSdkVersion based on >> productFlavors. Currently, I am trying to use android.setCompileSdkVersion >> for each flavor, but this is not updating the value appropriately. I've >> also tried looking into preprocessing tasks, but would like to avoid this >> if possible. >> >> Thank you for the help! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "adt-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
