我有一个涉及标签布局的应用。在第三个标签上我有一个谷歌地图,在第五个标签上,我可以在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 Share Dialog。有人可以帮帮我吗?谢谢!
答案 0 :(得分:4)
只需使用android-support-v4.jar
文件夹中的android-support-v4.jar
替换项目的Facebook-SDK>libs
答案 1 :(得分:4)
确保您没有从主项目的libs文件夹中添加android-support-v4.jar
库。如果您已经这样做,那么它将给出库依赖性错误。因为Facebook SDK也包含相同的库。
因此,您只需右键单击Prefrence>Android>from tab click on Add... and select Facebook SDK.
即可在项目中添加Facebook SDK作为库。如果从您的项目引用,还要从构建路径中删除android-support-v4.jar
。
答案 2 :(得分:0)
我建议您使用此处接受的答案中描述的解决方案:Facebook SDK for Android duplicate support library on dependencies
这样您就可以在两个项目中使用最新版本的支持库。