2

Please go easy on me as im still new to the eclispe software etc.... Ok so the problem i have is importing the facebook sdk. I programmed a little app and then retropsectively I thought it would be good to allow users to post something to facebook from it. So i imported the SDK. Then added it as a library for my project and i get the following errors

[
2013-07-15 09:37:58 - Myapp] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-07-15 09:37:58 - Myapp] All versions of the libraries must be the same at this time.
[2013-07-15 09:37:58 - Myapp] Versions found are:
[2013-07-15 09:37:58 - Myapp] Path: C:\myapp\libs\android-support-v4.jar
[2013-07-15 09:37:58 - Myapp]   Length: 484258
[2013-07-15 09:37:58 - Myapp]   SHA-1: bd6479f5dd592790607e0504e66e0f31c2b4d308
[2013-07-15 09:37:58 - Myapp] Path: C:\googledevelopement\facebook-android-sdk-3.0.2\facebook\libs\android-support-v4.jar
[2013-07-15 09:37:58 - Myapp]   Length: 349252
[2013-07-15 09:37:58 - Myapp]   SHA-1: 612846c9857077a039b533718f72db3bc041d389
[2013-07-15 09:37:58 - Myapp] Jar mismatch! Fix your dependencies
[2013-07-15 09:37:59 - Myapp] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-07-15 09:37:59 - Myapp] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-07-15 09:37:59 - Myapp] All versions of the libraries must be the same at this time.
[2013-07-15 09:37:59 - Myapp] Versions found are:
[2013-07-15 09:37:59 - Myapp] Path: C:\myapp\libs\android-support-v4.jar
[2013-07-15 09:37:59 - Myapp]   Length: 484258
[2013-07-15 09:37:59 - Myapp]   SHA-1: bd6479f5dd592790607e0504e66e0f31c2b4d308
[2013-07-15 09:37:59 - Myapp] Path: C:\googledevelopement\facebook-android-sdk-3.0.2\facebook\libs\android-support-v4.jar
[2013-07-15 09:37:59 - Myapp]   Length: 349252
[2013-07-15 09:37:59 - Myapp]   SHA-1: 612846c9857077a039b533718f72db3bc041d389
[
2013-07-15 09:37:59 - Myapp] Jar mismatch! Fix your dependencies

2013-07-15 09:37:59 - Myapp] Jar mismatch! Fix your dependencies

I have read on other threads (just delete the jar file) so i did that ... then i got lots of errors in the facebook project (108 to be precise) but here is a few:

Description Resource    Path    Location    Type
LocalBroadcastManager cannot be resolved    Session.java    /FacebookSDK/src/com/facebook   line 1215   Java Problem
Fragment cannot be resolved to a type   Session.java    /FacebookSDK/src/com/facebook   line 1843   Java Problem
Loader<SimpleGraphObjectCursor<T>> cannot be resolved to a type GraphObjectPagingLoader.java    /FacebookSDK/src/com/facebook/widget    line 109    Java Problem
Loader cannot be resolved to a type GraphObjectPagingLoader.java    /FacebookSDK/src/com/facebook/widget    line 27 Java Problem
LoaderManager cannot be resolved to a type  PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 813    Java Problem
Loader<SimpleGraphObjectCursor<T>> cannot be resolved to a type GraphObjectPagingLoader.java    /FacebookSDK/src/com/facebook/widget    line 119    Java Problem

What I was hoping for is a fix for either the dependancy problem (whichd doesnt cause other errors). Or a fix for the Errors after i delete the android-support-v4.jar from the facebook project.

Any help on this would be great as ive been scratching my head for a while now and running out of patients on googling it.

Thanks

Pratik Butani
  • 60,504
  • 58
  • 273
  • 437
Xeo
  • 389
  • 1
  • 5
  • 13

1 Answers1

3

Even i faced the same situation. This is what i did:

Facebook sdk has a v4 library. Your app will also have another v4.

Now the presence of two copies of same file confuses the compiler. This is what i did:

  • Removed the v4 library from my app. It shows errors, just ignore for time being.

  • Now add the facebook library.

    Everything will work fine.. hope it helps u.

You can also follow this answer.

Community
  • 1
  • 1
amalBit
  • 12,041
  • 6
  • 77
  • 94
  • 1
    Thanks, seems to have worked....i must have search like 15-20 posts and never found that one... I was deleting the facebook jar file. I assumed if deleted the one in my project it would cause problems. obviously not ... Thanks – Xeo Jul 15 '13 at 10:50
  • Your welcome.. Dont forget to tick or upvote if it helped.. :)\ – amalBit Jul 15 '13 at 10:56