Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle build fails due to duplicate entry in strings.xml

In my current Android project strings the mentioned below are used based on product:

<string name="insert_sd_card" product="nosdcard">"Por favor, inserte una tarjeta SD"  </string>
<string name="insert_sd_card" product="default">"Por favor, inserte una tarjeta SD"</string>

When I ran the Gradle build (tried with 0.7, 0.8, 0.9), I'm getting the following error:

*\res\values-es\strings.xml: Error: Found item String/insertsdcard more than one time

like image 744
apexer Avatar asked Nov 23 '22 01:11

apexer


1 Answers

Seems like you'll need to use per-flavor based configuration to achieve your needs - https://groups.google.com/forum/#!topic/adt-dev/iKy-umAQpAc

like image 185
xc0ffee Avatar answered Nov 25 '22 13:11

xc0ffee