2014-03-02 26 views
0

我知道有幾個線程處理同一個問題,但沒有一個解決方案適用於我。在依賴項列表中發現了google-play-services.jar的2個版本

我在構建一個同時使用Google和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 

我試過的Android工具--->「添加支持庫...」與所有三個項目(Facebook的SDK,谷歌SDK,我的應用程序內的項目),但錯誤依然存在。許多答案告訴人們刪除一個罐子或複製/粘貼罐子......但我對此很新,我不想破壞任何東西。

去這裏最好的方法是什麼?

+0

嘗試在所有相關的項目添加支持庫jar文件的版本相同。 –

+0

您是否導入了一個項目並在其中添加了'google-play-services.jar'?如果是,那麼刪除舊的'google-play-services.jar'並用你的SHA創建一個API密鑰,並將其放在清單文件 –

+0

上。但是,在導入項目後,我使用我的SHA創建了一個API密鑰並將其放入清單文件中。我是否仍然得到相同的錯誤信息? – strawberrywine

回答

0

上述問題出現在項目中使用同一個jar文件的多個版本(包括庫項目,如果添加的話)。最好的做法是刪除以前的jar文件並在所有的jar文件中添加一個新的更新的jar文件相應的項目。

請參閱這篇文章, https://stackoverflow.com/a/12045627/1665507

+0

@strawberry:是的刪除那些3,並在其中添加一個更新的相同的jar文件。 –

+0

剛注意到我無法刪除他們的Facebook和Google SDK。 http://bit.ly/1ogFBAb – strawberrywine

相關問題