Facebook的SDK上依赖Android的重复支持库 [英] Facebook SDK for Android duplicate support library on dependencies

查看:409
本文介绍了Facebook的SDK上依赖Android的重复支持库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了新的Facebook SDK 3.0测试版。该库项目包含了Android的支持库V4。我也有我自己的proyect支持库(不同版本虽然)。当我添加Facebook SDK作为一个图书馆中,我得到了一个错误的控制台上:

I have implemented the new Facebook SDK 3.0 beta. The library project contains the Android support library v4. I also have the support library on my own proyect (a different version though). When I add the Facebook SDK as a library I get the next error on the console:

Jar mismatch! Fix your dependencies
Found 2 versions of android-support-v4.jar in the dependency list,
but not all the versions are identical (check is based on SHA-1 only at this time).
All versions of the libraries must be the same at this time.

我试着排除文件夹的构建路径,但错误依然存在。

I've tried to exclude the libs folder on the buildpath, but the error remains.

我已经把同样的.jar在这两个地方。我失去了一些东西呢?我们的想法是用我自己的项目的支持库(以保持更新)。

I have to put the same .jar in both places. Am I missing something here? The idea is to use the support library of my own project (to keep it updated).

推荐答案

这似乎是不同的项目使用两个单独的支持库,因此,校验和是不同的。

It seems like the different projects are using two separate support libraries and therefore the checksum is different.

您必须的的重复此两个 Facebook的SDK项目,并正在构建的应用程序。

You must repeat this for both the Facebook SDK project and the app you are building.

我做什么,当我得到这个错误是:

What I do when I get this error is:

  1. 右键单击该项目。

  1. Right click the project.

将鼠标悬停在Android的工具。

Hover over Android Tools.

点击添加支持库...

接受库的下载。

这确保了两件事:一。您从谷歌的来源,和b得到支持库的最新版本。你在所有的项目完全相同的库。

This insures two things: a. you get the newest version of the support library from the Google sources, and b. you have the EXACT same library in all your projects.

编程快乐!

这篇关于Facebook的SDK上依赖Android的重复支持库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆