android - Eclipse ADT facebook 示例应用程序出现错误

标签 android facebook eclipse-adt

我关注了 https://developers.facebook.com/docs/android/getting-started/facebook-sdk-for-android/

一直到第 4 步,现在我无法运行任何应用程序,它们都有错误。我在 eclipse 中点击运行,我收到消息说我的程序包含错误,我必须在运行前修复它们。

怎么了?似乎 facebook 的内容无法被 eclipse 识别,但我逐字逐句地学习了教程。我已经多次清理了项目,尝试了一个新的工作区并单独清理了它和所有文件。我好不容易更新了所有的 SDK,我现在不知所措。

这是eclipse说的

[2013-09-18 18:50:46 - ProfilePictureSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - GraphApiSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - Scrumptious] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - PlacePickerSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - SessionLoginSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - RPSSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - FriendPickerSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - HelloFacebookSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - FacebookSDK] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - SwitchUserSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - FriendPickerSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - GraphApiSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - HelloFacebookSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - PlacePickerSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - ProfilePictureSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - Scrumptious] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - SessionLoginSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - SwitchUserSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:46 - FacebookSDK] Project compiler settings changed. Clean your project.

[2013-09-18 18:50:46 - FriendPickerSample] Project compiler settings changed. Clean your project.

[2013-09-18 18:50:46 - GraphApiSample] Project compiler settings changed. Clean your project.

[2013-09-18 18:50:47 - HelloFacebookSample] Project compiler settings changed. Clean your project.

[2013-09-18 18:50:47 - PlacePickerSample] Project compiler settings changed. Clean your project.
[2013-09-18 18:50:47 - ProfilePictureSample] Project compiler settings changed. Clean your project.

[2013-09-18 18:50:47 - FacebookSDK] Unable to resolve target 'android-8'

[2013-09-18 18:50:47 - ProfilePictureSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:47 - GraphApiSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:47 - Scrumptious] Unable to resolve target 'android-8'

[2013-09-18 18:50:47 - PlacePickerSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:47 - SessionLoginSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:47 - RPSSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:47 - FriendPickerSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:47 - HelloFacebookSample] Unable to resolve target 'android-8'

[2013-09-18 18:50:47 - SwitchUserSample] Unable to resolve target 'android-8'

最佳答案

看看你的 AndroidManifest.xml,正是这一行:

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17" />

并检查您的最低版本和目标版本!

*该行是我的一个项目的示例;)

编辑:同时检查 Eclipse 中的“Android SDK 管理器”,并下载 API 8

关于android - Eclipse ADT facebook 示例应用程序出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18883669/

相关文章:

android - 如何立即刷新 ImageView

facebook - 有没有办法在没有 ssl 的情况下将页面添加到 facebook 选项卡?

Android/Eclipse - 是否可以使用一台设备模仿另一台设备?

android - 确定用户是否选择 Facebook 作为社交分享选项

facebook - 使用 Facebook Graph API 上传动画 GIF 文件

android - 如何使用 ADT 插件将 "Android Design Support Library"添加到 Eclipse?

java - 从 Windows 8 中提取 adt-bundle-windows-x86_64-20140702 时出现此错误

Java Android : How to force only one instance of an app (singleTop not working correctly)?

android - 从 Adapter + ListView 打开时出现对话框错误

android - "id cannot be resolved or is not a field"错误?