Dangers of copying files (Google Play Services Lib)

Had an issue today where after upgrading to the latest version of the Google Play Services the build process threw up a ton of  cryptic error messages like “Temp/StagingArea/android-libraries/google-play-services_lib/res/values/common_colors.xml:4: error: Resource entry common_signin_btn_dark_text_default is already defined.”

Turns out that while upgrading the Google Play Services folder, instead of replacing the old folder completely, the new folder was merged with the old one.  This left the old ‘colors.xml’ file which then conflicted with the new ‘common_colors.xml’ file.  Deleting the old folder and then copying in the new folder fixed it!

Obviously we figured it out, but it did manage to waste 30 minutes.  Hopefully, by writing this entry, I’ll remember the next time this happens, and maybe even help some other unfortunate soul from wasting their own 30 minutes.


Leave a Reply