Facebook的SDK上依赖Android的重复支持库Facebook、SDK、Android

2023-09-12 07:39:24 作者:love song 情歌

我已经实现了新的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:

右键单击该项目。

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.

编程快乐!