java.lang.NoClassDefFoundError的:com.facebook.android.Facebook [英] java.lang.NoClassDefFoundError: 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的Android的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屋!