androidfacebookeclipse-adt

Eclipse ADT facebook sample apps getting an error


I followed https://developers.facebook.com/docs/android/getting-started/facebook-sdk-for-android/

word for word up to step 4 and now I can't run any apps, they all have errors. I hit run in eclipse and I get the message saying my programs contain errors and I must fix them before running.

What is wrong? It seems like the facebook stuff isn't recognized by eclipse but I followed the tutorial word for word. I already cleaned the projects multiple times, tried a new workspace and cleaned that and all files individually. I updated all the SDK with much difficulty and I am at a loss of what to do now.

Here is what eclipse says

[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'

Solution

  • Look yout AndroidManifest.xml, exactly this line:

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

    And check your min and target version!

    *the line is an example of one of my projects ;)

    EDIT : Also check your "Android SDK manager" in Eclipse, and download de API 8