Finally, after the Android Facebook SDK correctly imported thanks to this , I found that eclipse did not recognize the onclick override in FbDialog.java:
mCrossImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mListener.onCancel(); FbDialog.this.dismiss(); } });
Nor does it recognize the onServiceConnected and onServiceDisconnected overrides in the TokenRefreshServiceConnection ServiceConnection override
@Override public void onServiceConnected(ComponentName className, IBinder service) { messageSender = new Messenger(service); refreshToken(); } @Override public void onServiceDisconnected(ComponentName arg) { serviceListener.onError(new Error("Service disconnected"));
All three methods say in a warning that the method should override the superclass method. I have not changed the code yet. I checked that Eclipse recognizes the types as the same in the corresponding superclasses, and I tried pressing control-shift-o to organize the import, which was fixed in this answer for a similar task.
These overrides are part of the SDK, not a separate project. I configured the project to use the Android SDK 2.2, as shown in the Facebook instructions, and 4.0.3, which should be theoretically compatible with all previous versions. I have not yet received my own Facebook code to work. As a note, is there a jar that I can use instead? That would make it a lot easier.
source share