The first error I got was the String.xml file contains more than one items with same name. It seems to be a common pattern across almost all the system apps you can check it here
The string value will have this format:
<string name="photoPickerNotFoundText" products="xxx">string value</string>
where xxx could be "tablet" or "default", etc.
How could I set up the Gradle to get the project built on my machine? Thank!
UPDATE I think that the solution is using the --product option of the aapt (android asset packaging tool). The current gradle android plugin doesn't support this aapt's option yet so maybe modifying the plugin could be a work around.