简体   繁体   中英

Error when add facebook sdk to Android project

I want to creat an app login and upload photo to facebook.. I downloaded facebook android sdk at : https://github.com/facebook/facebook-android-sdk I also done as that tutorial: https://developers.facebook.com/docs/mobile/android/sso/ But in step 1: when i create a facebook sdk project,it display error at Facebook class in part:

    @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"));
        // We returned an error so there's no point in
        // keeping the binding open.
        applicationsContext.unbindService(TokenRefreshServiceConnection.this);
    }

Image error: http://nn7.upanh.com/b1.s28.d1/249400dcc8b86b740a9fab6679a809e3_45509157.project2.png

I don't resolve this problem so I can't do next step.:(

Can you help me.

You will need to do two things:

  1. link the facebook sdk to your project.
  2. link the com_facebook_android library to your project.

You might also need to clean your project, and perhaps use the "fix project properties automatically" tool. Perhaps even restart eclipse if you still have errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM