java.lang.NoClassDefFoundError的:com.facebook.android.Facebook [英] java.lang.NoClassDefFoundError: com.facebook.android.Facebook

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

问题描述

我运行应用程序时com.facebook.android.Facebook

我不断收到错误java.lang.NoClassDefFoundError的。

此调用时出现:

= Facebook的新的Facebook(APP_ID);

Addtional错误消息:

找不到类的com.facebook.android.Facebook,从法com.example.example1.ShareOnFacebook.onCreate引用

我通过在Eclipse中引用的库添加Facebook .jar文件。

有没有人遇到/解决这个问题?

解决方案

只要到项目/属性/ Java构建路径/排序和导出,然后点击瓶子的复选框。这将设置的水瓶中出口。您可以在.classparh文件验证这一点: classpathentry输出=真的那种=LIB路径=/我-罐/ Facebook的Andr​​oid的SDK-1.2.1.jar

不要忘干净后您的项目(项目/清洁...)

I keep getting the error java.lang.NoClassDefFoundError: com.facebook.android.Facebook when running my application.

This occurs when calling:

facebook = new Facebook(APP_ID);

Addtional error message:

Could not find class 'com.facebook.android.Facebook', referenced from method com.example.example1.ShareOnFacebook.onCreate

I have add the facebook .jar file via Referenced libraries in Eclipse.

Has anyone encountered/solve this problem?

解决方案

Just go to Project / Properties / Java Build Path / Order and Export and click on jar's checkbox. This will set jar as "exported". You can verify this in .classparh file: classpathentry exported="true" kind="lib" path="/my-jars/facebook-android-sdk-1.2.1.jar"

Don't forget to clean your project after that (Project / Clean...)

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

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