我跟着 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'
答案 0 :(得分:2)
看看AndroidManifest.xml,正是这一行:
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17" />
检查你的最小和目标版本!
*该行是我的一个项目的示例;)
编辑:还要检查Eclipse中的“Android SDK管理器”,然后下载de API 8