Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Facebook SDK import occurs with errors - Eclipse

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.

like image 533
Zolt Avatar asked Mar 15 '12 02:03

Zolt


2 Answers

try this:

right click your project -> properties -> java compiler

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

like image 92
idiottiger Avatar answered Nov 01 '22 15:11

idiottiger


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.

like image 26
WallyHale Avatar answered Nov 01 '22 16:11

WallyHale