System apps are built with Makefile. They are also using the "product"
attribute in the resources that is not available to 3rd party apps (and
therefore not supported by Gradle).

Yes variants would help, but you'd have to manually change the resources to
make it work with Gradle. There's no filters in gradle that would work.
You'd need to create 2 flavors (phone, tablet) and move that resource to
its specific folder (src/phone/res/values/..., and
src/tablet/res/values/...)

On Fri, Apr 3, 2015 at 3:45 PM, <[email protected]> wrote:

> Hi all!
>
> Recently I have been diving in the android open source project to learn
> about the implementation of some system apps. I couldn't import and build
> some apps in my machine (eg. contacts, mms app, ...). The first error I got
> is that there are multiple string value with the same name. For example in
> this
> <https://android.googlesource.com/platform/packages/apps/Mms/+/master/res/values-en-rGB/strings.xml>
> resource file you can see some string values with duplicated name, for
> example:
>
>    1. <string name="sim_copy_to_phone_memory" product="tablet" msgid=
>    "3721000641648594602">"Copy to tablet memory"</string>
>    2. <string name="sim_copy_to_phone_memory" product="default" msgid=
>    "5895767417844881971">"Copy to phone memory"</string>
>
>
> After doing some research, I think it could be some thing with build
> variants. It seems like they have different apks for different types of
> devices. But that all I got. I think I should write some kind of filters in
> the Gradle build file to make it work but I couldn't find any guideline in
> the official android tools project site
> <http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants>
> .
>
> Hope that some body can help me out!
> Thank!
>
>
>  --
> 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.
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

-- 
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.

Reply via email to