2

我有一个涉及选项卡布局的应用程序。在第三个选项卡上我有一个谷歌地图,在第五个选项卡上我可以在 Facebook 的地图上分享我的行踪。我为 Google 地图导入了 Google Play 服务,但是我正在尝试导入 Facebook SDK。然后弹出这些错误:

[2013-10-17 11:58:48 - QuezonCityGuide] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-10-17 11:58:48 - QuezonCityGuide] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-10-17 11:58:48 - QuezonCityGuide] All versions of the libraries must be the same at this time.
[2013-10-17 11:58:48 - QuezonCityGuide] Versions found are:
[2013-10-17 11:58:48 - QuezonCityGuide] Path:     C:\Users\user\workspace\QuezonCityGuide\libs\android-support-v4.jar
[2013-10-17 11:58:48 - QuezonCityGuide]     Length: 556198
[2013-10-17 11:58:48 - QuezonCityGuide]     SHA-1: 4a6be13368bb64c5a0b0460632d228a1a915f58f
[2013-10-17 11:58:48 - QuezonCityGuide] Path: C:\Users\user\Downloads\facebook-android-sdk-3.5.2\facebook-android-sdk-3.5.2\facebook\libs\android-support-v4.jar
[2013-10-17 11:58:48 - QuezonCityGuide]     Length: 349252
[2013-10-17 11:58:48 - QuezonCityGuide]     SHA-1: 612846c9857077a039b533718f72db3bc041d389
[2013-10-17 11:58:48 - QuezonCityGuide] Jar mismatch! Fix your dependencies

我正在尝试使用 Facebook 分享对话框。有人可以帮帮我吗?谢谢!

4

3 回答 3

4

确保您没有android-support-v4.jar从主项目的 libs 文件夹中添加库。如果你这样做了,那么它会给出库依赖错误。因为 Facebook SDK 也包含相同的库。

因此,您只需通过右键单击将 Facebook SDK 作为库添加到您的项目中,如果它从您的项目中引用,请从您的构建路径Prefrence>Android>from tab click on Add... and select Facebook SDK.中删除您的。android-support-v4.jar

于 2013-10-17T06:07:15.743 回答
4

只需用文件夹中的存在替换android-support-v4.jar您的项目android-support-v4.jarFacebook-SDK>libs

于 2013-10-17T05:47:24.233 回答
0

我建议您使用此处接受的答案中描述的解决方案:Facebook SDK for Android duplicate support library on dependencies

这样,您将在两个项目中拥有最新版本的支持库。

于 2013-10-24T19:23:30.953 回答