为Android的Facebook示例应用程序无法正常工作 [英] Facebook sample apps for Android not working

查看:260
本文介绍了为Android的Facebook示例应用程序无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是试用一下Facebook的SDK为Android跟着入门指南。完成所有步骤,但是当我导入示例项目偏食,编译失败,出现以下错误:

was just trying out the Facebook SDK for android followed the getting started guide. Completed all the steps, but when I imported the sample projects to eclipse, the compilation failed with the following error:

片段不能被解析为一个类型ProfilePictureSampleFragment.java

Fragment cannot be resolved to a type ProfilePictureSampleFragment.java

然后我加入supportLibrary(从AndroidSDK /演员/安卓/支持/ Android的支持 - v4.jar)作为外部罐子。编译错误不再出现,但是当我尝试运行应用程序,它扔我此异常:

I then added the supportLibrary (from AndroidSDK/extras/android/support/android-support-v4.jar)as an external jar. The compilation error was no longer there, but when I try to run the app, its throwing me this exception:

二月六日至八日:16:18.337:E / AndroidRuntime(856):致命异常:主要
二月六日至八日:16:18.337:E / AndroidRuntime(856):了java.lang.RuntimeException:无法实例活动ComponentInfo{com.facebook.samples.profilepicture/com.facebook.samples.profilepicture.ProfilePictureSampleActivity}:抛出java.lang.ClassNotFoundException:com.facebook.samples.profilepicture.ProfilePictureSampleActivity

06-08 02:16:18.337: E/AndroidRuntime(856): FATAL EXCEPTION: main 06-08 02:16:18.337: E/AndroidRuntime(856): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.facebook.samples.profilepicture/com.facebook.samples.profilepicture.ProfilePictureSampleActivity}: java.lang.ClassNotFoundException: com.facebook.samples.profilepicture.ProfilePictureSampleActivity

所有其他PARAMS为默认。我使用的是Mac OS和已登记的关键哈希到我的开发设置。我试图运行ProfilePictureSample应用程序。

All other params are default. I am using a MAC OS and have registered the key hash to my developer settings. I am trying to run the ProfilePictureSample app.

推荐答案

哦..只是得到它的工作。刚走到Java构建路径,并在那里检查Android支持-v4.jar。工作:)

oh.. just got it working. Just went to Java build path and checked android-support-v4.jar in there. Worked :)

这篇关于为Android的Facebook示例应用程序无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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