1

Posible Duplicate of Jar mismatch error when adding library in eclipse

But i have not getting any help so i am asking it again.

When i create new project in Eclipse two folder created

  1. Demoapp (project name)
  2. appcompact_v7

Problem: when i right click project and selecting “Properties|Android”, then clicking “Add…” in the Library section and selecting the ViewPagerIndicator library.

Its giving me error:

[2014-04-07 17:55:54 - DemoApp] Found 3 versions of android-support-v4.jar in the dependency list,
[2014-04-07 17:55:54 - DemoApp] but not all the versions are identical (check is based on SHA-1 only at this time).
[2014-04-07 17:55:54 - DemoApp] All versions of the libraries must be the same at this time.
[2014-04-07 17:55:54 - DemoApp] Versions found are:
[2014-04-07 17:55:54 - DemoApp] Path: C:\Users\WebInfoMart\workspace\appcompat_v7\libs\android-support-v4.jar
[2014-04-07 17:55:54 - DemoApp]     Length: 627582
[2014-04-07 17:55:54 - DemoApp]     SHA-1: cb6883d96005bc85b3e868f204507ea5b4fa9bbf
[2014-04-07 17:55:54 - DemoApp] Path: C:\Users\WebInfoMart\workspace\DemoApp\libs\android-support-v4.jar
[2014-04-07 17:55:54 - DemoApp]     Length: 627582
[2014-04-07 17:55:54 - DemoApp]     SHA-1: cb6883d96005bc85b3e868f204507ea5b4fa9bbf
[2014-04-07 17:55:54 - DemoApp] Path: C:\Users\WebInfoMart\workspace\library\libs\android-support-v4.jar
[2014-04-07 17:55:54 - DemoApp]     Length: 271754
[2014-04-07 17:55:54 - DemoApp]     SHA-1: 53307dc2bd2b69fd5533458ee11885f55807de4b
[2014-04-07 17:55:54 - DemoApp] Jar mismatch! Fix your dependencies 

Already Tried: I deleted Demoapp>lib>android-support-v4.jar & appcompact_v7>lib>android-support-v4.jar both files and copied ViewPagerIndicator library>lib>android-support-v4.jar to my DemoApp and appcompact_v7 folder, then clean and rebuild project.

But nothing seems to work. while Sample project of ViewPagerIndicator library is working fine.

Any suggestion would be appreciated. Thanks

Community
  • 1
  • 1

3 Answers3

2

I have same issue this is how i fixed it as @Raghunandan already answered here jar mismatch from log cat on program run using google play service

Its because of library and project have different jar file

Solution :

Just copy the android-support-v4.jar from sdk/extras/android/support/v4/android-support-v4.jar to the libs folder of both ViewPagerIndicator library project and Your Android project.

Hope this helps

For Tutorial of ViewPagerIndicator http://blog.stylingandroid.com/archives/537

Community
  • 1
  • 1
Manwal
  • 23,450
  • 12
  • 63
  • 93
0

Since your ViewPagerIndicator library already have the android-support-v4.jar and so remove it from Demoapp and appcompact_v7, then it will work. As both the projects are inheriting it from the ViewPagerIndicator

0

Support library from ViewPagerIndicator is an old one, try to update it with the one used in your DemoApp. Then delete it from DemoApp.

There's a pull request open to update the v4 support library for ViewPagerIndicator: https://github.com/JakeWharton/Android-ViewPagerIndicator/pull/271

kphil
  • 891
  • 1
  • 9
  • 14