0

I am trying to integrate facebook to my Android application. When i added internet permission in the project and have generated App_ID but when I put facebook files in to my project it gives these errors as shown in pic.

Now should I remove @Override or am I missing something.

If I put this code into my OnCreate method it also gives errors to remove @Override.

 facebook.authorize(this, new DialogListener() {
            @Override
            public void onComplete(Bundle values) {}

            @Override
            public void onFacebookError(FacebookError error) {}

            @Override
            public void onError(DialogError e) {}

            @Override
            public void onCancel() {}
        });

enter image description here

Should I include facebook.apk if yes then Where to add this? please help

I followed many tutorials but could not resolve these errors.

Azhar
  • 20,500
  • 38
  • 146
  • 211
  • Have you checked java compiler version? Project properties>java Compiler, set it to 1.6. Generally this error comes due to it. If apk is generated after removing @Override then the application works fine in the projects i have seen. I hope this minor things helps. :) – Raj Shah May 02 '12 at 04:34

1 Answers1

1

This is most likely because you are switching between Java 1.5 and Java 1.6. In 1.5 you couldn't mark interface implementations with @Override, but you can in 1.6.

@Override annotation error (android prefs)

Bug with Override annotations in Eclipse

Community
  • 1
  • 1
Dheeresh Singh
  • 15,643
  • 3
  • 38
  • 36