Android facebook SDK做错误java.lang.NoClassDefFoundError [英] Android facebook SDK doing error java.lang.NoClassDefFoundError‎

查看:136
本文介绍了Android facebook SDK做错误java.lang.NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从 http://github.com/facebook/facebook- android-sdk
我从git解压缩它并打开Eclipse。然后我使用现有的源创建了一个新项目,并选择了facebook目录。所以sdk项目正确地出现(我想)。然后我再次使用现有的源创建了一个新的项目,并选择了简单的例子。
它提出了错误。我进入了属性,选择了Build Path部分,并添加了facebook SDK项目并进行了应用。所有错误消失。
然后我尝试运行示例,但是在第一次调用facebook SDK功能时收到异常!异常是NoClassDefFoundError。它似乎在运行时找不到SDK的类。怎么来的 ?有什么建议么 ?有人成功运行这个例子?任何帮助将不胜感激。

I have just downloaded the facebook SDK from http://github.com/facebook/facebook-android-sdk I unpack it from git and opened Eclipse. I then created a new project using existing source and selected the facebook directory. So the sdk project came up correctly (i think). Then I created a new project again using existing source and selected the "Simple" example. Its came up with errors. I went in the properties and selected Build Path section and added the facebook SDK project and applyed. All the errors disappear. I then tried to run the Example but im getting an exception on the first call to facebook SDK function ! Exception is NoClassDefFoundError. Its seems that at runtime it cannot find the class of the SDK. How come ? Any suggestions ? Someone did sucessfully run this example ? Any help would be greatly appreciated.

推荐答案

右键单击项目。选择属性 - > Android。在图书馆下方,点击Add ...按钮,选择Facebook SDK Project的路径。

Right click on the Project. Choose Properties -> Android. Under Library click on the Add... button and select the path to the Facebook SDK Project.

这篇关于Android facebook SDK做错误java.lang.NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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