Android 在依赖项列表中找到2个版本的google-play-services.jar

Android 在依赖项列表中找到2个版本的google-play-services.jar,android,eclipse,shared-libraries,dependency-properties,Android,Eclipse,Shared Libraries,Dependency Properties,我知道有几个线程处理同一个问题,但没有一个解决方案对我有效 我正在构建一个同时使用谷歌和Facebook SDK的应用程序。启动Eclipse时,我收到以下错误消息: [2014-03-02 11:40:40 - ***] Found 2 versions of google-play-services.jar in the dependency list, [2014-03-02 11:40:40 - ***] but not all the versions are identical (

我知道有几个线程处理同一个问题,但没有一个解决方案对我有效

我正在构建一个同时使用谷歌和Facebook SDK的应用程序。启动Eclipse时,我收到以下错误消息:

[2014-03-02 11:40:40 - ***] Found 2 versions of google-play-services.jar in the dependency list,

[2014-03-02 11:40:40 - ***] but not all the versions are identical (check is based on SHA-1 only at this time).

[2014-03-02 11:40:40 - ***] All versions of the libraries must be the same at this time.

[2014-03-02 11:40:40 - ***] Versions found are:

[2014-03-02 11:40:40 - ***] Path: /Users/***/Development/adt-bundle-mac-x86_64-20131030/sdk/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar

[2014-03-02 11:40:40 - ***]     Length: 1501528

[2014-03-02 11:40:40 - ***]     SHA-1: e5f81129dfb3d02df80126512bc98278ed2bb40a

[2014-03-02 11:40:40 - ***] Path: /Users/***/Development/my-app/libs/google-play-services.jar

[2014-03-02 11:40:40 - ***]     Length: 103227

[2014-03-02 11:40:40 - ***]     SHA-1: 70356edea26cc0bec4870d2cbd0eec6f0d2ffcae

[2014-03-02 11:40:40 - ***] Jar mismatch! Fix your dependencies
我在所有三个项目(Facebook SDK、Google SDK、我的应用程序项目)中尝试了Android工具-->“添加支持库…”,但错误依然存在。很多答案告诉人们删除一个jar或复制/粘贴jar。。。但我对这件事还很陌生,我不想破坏任何东西


最好的方法是什么?

当项目中使用同一jar文件的多个版本时(如果添加了库项目,则包括库项目),会出现上述问题。最佳做法是删除以前的jar文件,并在所有相应的项目中添加一个新更新的相同jar文件

参考这篇文章,

尝试在所有相关项目中添加相同版本的support library jar文件。您是否导入了一个项目并将
google play services.jar
添加到该项目中?如果是,那么删除旧的
googleplayservices.jar
,用SHA创建一个API密钥,并将其放在清单文件中。我确实这样做了。但是,在导入项目后,我用SHA创建了一个API密钥,并将其放入清单文件中。我是否仍会收到相同的错误消息?只需从project lib文件夹中删除google play service lib并清理一次即可。@strawberrywine:是的,删除这3个,并在其中添加一个更新的jar文件。只是注意到我无法为Facebook和google SDK删除它们。