Hi sbarta, Thanks for reply, I see your points. Yes, product flavor name should only affect the build and isn't user-visible.
For convenience, I use flavor name set meta-data value in AndroidManifest.xml for each release. Now I have changed this reserved name and set another local variable based on flavor name for the meta-data value replacement, in order to make the statistic report im consistent with old release. Thanks, York On Thursday, July 17, 2014 11:10:42 PM UTC+8, sbarta wrote: > > You can't use "main" as the name of a custom flavor. There's already a > main -- it's the name of the default source set, i.e. src/main, and you > can't have a flavor with the same name. > > This shouldn't affect anything you're doing for marketing purposes -- this > name should only affect the build and isn't user-visible. > > > On Thu, Jul 17, 2014 at 3:23 AM, Ye Wang <[email protected] > <javascript:>> wrote: > >> Hi, >> >> I am quite new to Gradle and Groovy so not sure if this should be >> reported as a bug. >> >> if I use "main" as a product flavor name, like this: >> >> productFlavors { >> main {} >> ... ... >> } >> >> or in this form: >> >> productFlavors { >> 'main' {} // same if using double quote >> ... ... >> } >> >> Then in IDE (I use classic IntelliJ 13 Community Edition), it is >> highlighted with a warning: >> >> >> * 'main' in 'build' cannot be applied to '(groovy.lang.Closure)' >> less... (Ctrl + F1)* >> >> * This inspection reports assignments with incompatible types * >> >> If I run gradle build from command-line, it ends with: >> >> * FAILURE: Build failed with an exception.* >> >> * * What went wrong:* >> * A problem occurred configuring root project 'com.example'.* >> * > SourceSets 'main' and 'main' use the same file for 'manifest': >> C:\projects\android\source\com.example\AndroidManifest.xml* >> >> * * Try:* >> * Run with --stacktrace option to get the stack trace. Run with --info >> or --debug option to get more log output.* >> >> * BUILD FAILED* >> >> We are working on an existing project, the selected word is used for >> statistic and marketing purpose, so we really prefer do not change the >> existing name, if it is possible to fix. >> >> >> Thanks for reading. >> York >> >> -- >> 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.
