5

I'm sort of desperate with this question. I've been stuck on this for days and need help. Please let me know if you can help at all.

I'm following the Facebook tutorial and all goes well until I get to step "Step 3: Create New Facebook SDK Project". After following the steps EXACTLY as on the site, and on many different tutorials on the web, the com_facebook_android project is full of errors. The errors occur in Facebook.java and FbDialog.java. I do nothing and from the beginning the error are there.

Untitled-1

I've tried

  1. creating the project from existing source
  2. importing the project
  3. re-creating the project from scratch

None of these attempts work. Is there a step missing that I didn't do? Does anyone else have this problem?

Here are all the errors. Please, please, someone help.

Facebook.java

The method onServiceConnected(ComponentName, IBinder) of type Facebook.TokenRefreshServiceConnection must override a superclass method

The method onServiceDisconnected(ComponentName) of type Facebook.TokenRefreshServiceConnection must override a superclass method

FbDialog.java

The method onClick(View) of type new View.OnClickListener(){} must override a superclass method

Removing the override annotation just causes more errors.

Please help.

Community
  • 1
  • 1
Zolt
  • 2,761
  • 8
  • 43
  • 60
  • why do Facebook SDK comes with sooo many errors?!!!! and neither sample programs works fine!!!! – Anitha May 18 '15 at 11:57

2 Answers2

10

try this:

right click your project -> properties -> java compiler

select enable project specific , and select compiler comp level to 1.6

idiottiger
  • 5,147
  • 2
  • 25
  • 21
3

idiottiger's response worked for me too, but it's important to note you probably need to restart Eclipse (I did) after the change.

That's the last time I'll update Eclipse! Post update, it wouldn't start up again, and I had to do a clean install, which lead me to this issue with an imported project.

WallyHale
  • 408
  • 1
  • 5
  • 11