7

I'm trying to import this project in Android Studio 1.0.1
https://github.com/android/platform_packages_apps_contacts

When I build the app it shows these two errors:

* Error:Execution failed for task ':app:mergeDebugResources'.
* C:\Users\vinz\AndroidStudioProjects\platform_packages_apps_contacts-master\app\src\main\res\values\strings.xml: Error: Found item String/photoPickerNotFoundText more than one time

I wonder what's wrong in this source code provided by Google. I've tried removing the string IDs and also changing the names but nothing's working at all.

vin
  • 519
  • 2
  • 6
  • 18

1 Answers1

14

There is a bug filed here (https://code.google.com/p/android/issues/detail?id=57020) with someone from Google providing a pretty good answer.

The package you've linked to is one of the package contained in the Android Open Source Project (AOSP), and is usually built by the AOSP build system (and not Android Studio or Eclipse). As such, it's liable to contain things that Android Studio can't handle (such as duplicate strings, and references to hidden APIs).

Basically, the duplicate string is something that the Android build system (AOSP) handles internally through post processing, and isn't generally allowed in normal application projects.

You probably can get around this, but it may require some small modifications to the sources.

James Puderer
  • 306
  • 3
  • 9
  • 1
    I already all strings.xml (for other languages) and left one. But still got the issue: "Error:Error: Found item String/custom more than one time". How to fix this? – iadcialim24 Dec 08 '17 at 07:00