简体   繁体   English

尝试将facebooksdk.jar文件添加到我的项目中

[英]Trying to add facebooksdk.jar file to my project

I have installed facebookSDK and the sample apps. 我已经安装了facebookSDK和示例应用程序。 The sample apps all copilr and run fine. 示例应用程序全部编译并运行良好。

I tried to make my own app. 我尝试制作自己的应用。 The only thing I did was creat a new android project, test it, runs fine. 我唯一要做的就是创建一个新的android项目,对其进行测试,可以正常运行。 Then I added the facebooksdk jar file. 然后我添加了facebooksdk jar文件。 Now my project no longer runs and I get a error that says 现在我的项目不再运行,并且出现错误提示

“jar miss match fix your dependencies” “罐子错过比赛解决您的依赖性”

The jar file seed to load in correctly, if I click on android dependences I see Facebooksdk.jar ../programming/facebooksdk/…… 要正确加载的jar文件种子,如果单击android依赖项,则会看到Facebooksdk.jar../programming/facebooksdk/……

I tried to see what was different from my project ans facebook's sample code. 我试图查看与我的项目ans facebook的示例代码有什么不同。
Under android dependencies it had the same line I had Facebooksdk.jar ../programming/facebooksdk/…… 在android依赖项下,它与我有Facebooksdk.jar../programming/facebooksdk/……的行相同。

And also had another jar file called android-suppert-v4-.jar that I do not have. 并且还有另一个我没有的名为android-suppert-v4-.jar的jar文件。

Other then that both the sample code and my test project seem to be the same. 除此之外,示例代码和我的测试项目似乎都相同。

facebook sdk项目和您的项目中都存在一个jar。

This is caused by having a duplicate jar -- a .jar file of the same name that appears in both projects, but is not the exact same file. 这是由于有一个重复的jar导致的-两个项目中都出现了同名的.jar文件,但文件不完全相同。 In this case, it is probably android.support.v4.jar, since Facebook uses it, and your project likely does too. 在这种情况下,它可能是android.support.v4.jar,因为Facebook使用了它,而您的项目也可能这样做。

Check your dependencies carefully (and check your assets, bin, etc. folders) for the android support library in your own project -- even if you didn't add it yourself, the dependency could have been added by default, especially if you used the wizards provided with ADT for eclipse. 仔细检查您自己项目中的android支持库的依赖项(并检查您的资产,bin等文件夹)-即使您自己没有添加依赖项,默认情况下也可能已经添加了依赖项,尤其是当您使用ADT随附的用于Eclipse的向导。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Facebook SDK,Android依赖项显示facebooksdk.jar丢失 - Facebook sdk, Android dependencies showing facebooksdk.jar is missing Android Dependencies库中缺少facebooksdk.jar - facebooksdk.jar missing from Android Dependencies library 容器“ Android Dependencies”引用了不存在的库“ C:\\ Users \\ workspace \\ FacebookSDK \\ bin \\ facebooksdk.jar” - The container 'Android Dependencies' references non existing library 'C:\Users\workspace\FacebookSDK\bin\facebooksdk.jar' 如何在我的图书馆项目中添加jar文件? - How to add a jar file in my library project? 错误:项目FacebookSDK中的“ ._android-support-v4.jar” - ERROR: “._android-support-v4.jar” in project FacebookSDK XAMARIN如何将jar添加到我的项目中 - XAMARIN how to add jar to my project 在我的android项目中使用apktool jar文件? - Use apktool jar file in my android project? 如何在另一个Android项目中将Android项目添加为JAR文件 - How to add an android project as a JAR file in another android project 如何在IntelliJ IDEA上为我的Android项目添加Ksoap2 Jar文件 - How to add Ksoap2 Jar file on IntelliJ IDEA for my android project 如何在Android项目中添加“添加外部Jar” - How can i add “Add External Jar” to my project in android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM