Error:Error: Found item String/photoPickerNotFoundText more than one time

一笑奈何 提交于 2019-12-18 16:11:54

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/27541158/errorerror-found-item-string-photopickernotfoundtext-more-than-one-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!