简体   繁体   中英

Combine ActionbarSherlock and Facebook API Graph

this might be a bit of a newbie question, but here goes: I am currently working on an Android application in which I need the Facebook library and the Action Bar Support library.

when I tried to combine the ABS library (eg compile a project into a library) and the Facebook library (eg integrate the Facebook SDK for Android as a project and compile it into a library), then I am running into the following problem: the 2 support libraries used by ABS and Facebook are different. When I tried to replace the support librarie in Facebook with the newer one used by ABS, I got into compile errors in the Facebook SDK. So what is the best way to go? How can I combine the both without having to sacrifice support library functionalities?

Remove the support librairy in one of them and replace it with the version of the other one.

If you use maven, just remove the library in ABS libs folder, and change the version in the pom to match the support library used by facebook.

I faced a similar difficulty, although, mine was for ABS and the ViewPager library. What I did in my case was:

  1. Delete the Support Library jar file from ViewPager .
  2. Added ABS as the reference library to the ViewPager library
  3. In my project, I only reference the ViewPager .

In your case, you could try doing this:

  1. Delete the Support Library jar from the Facebook SDK .
  2. Add ABS as the reference library to the Facebook SDK .
  3. And in your application project, add the Facebook SDK as the only referenced library.

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