Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error on add library project in eclipse

enter image description here

I added library project inside eclipse. But i got following error

[2012-10-09 11:25:38 - Share] Found 2 versions of android-support-v4.jar in the dependency list,
[2012-10-09 11:25:38 - Share] but not all the versions are identical (check is based on SHA-1 only at this time).
[2012-10-09 11:25:38 - Share] All versions of the libraries must be the same at this time.
[2012-10-09 11:25:38 - Share] Versions found are:
[2012-10-09 11:25:38 - Share] Path: D:\android 4 tools\work1\Share\libs\android-support-v4.jar
[2012-10-09 11:25:38 - Share]   Length: 349252
[2012-10-09 11:25:38 - Share]   SHA-1: 612846c9857077a039b533718f72db3bc041d389
[2012-10-09 11:25:38 - Share] Path: D:\android 4 tools\work1\Android-Feather\libs\android-support-v4.jar
[2012-10-09 11:25:38 - Share]   Length: 337562
[2012-10-09 11:25:38 - Share]   SHA-1: 27c24d26e4c5d57976e6926367985548678e913c
[2012-10-09 11:25:38 - Share] Jar mismatch! Fix your dependencies
like image 781
Ram Avatar asked Oct 09 '12 06:10

Ram


1 Answers

Use same android-support-v4.jar library in both library and your main project.

To do this remove android-support-v4.jar file form both library and your main projects build path and then remove android-support-v4.jar from your libs path. Then reinsert same android-support-v4.jar in both library and main project. Then use add to build path to add lib to your projects.

This will solve your problem.

How to add or remove support lib in project

How to Add Support Lib in Project :

To add latest support lib to your android project do these steps :

  1. Right click on your android project.
  2. Select Android Tools
  3. Then select Add Support Library

Then follow the screen instructions and this will add latest support library to your libs folder.

How to add support lib to project

Now right click on android-support-v4.jar file in libs folder and Add it to build path as I described. You will have the latest support lib in your project.

UPDATE As 'Doctoror Drive' said you only need to add support library in your library project. So only add support library to your library project.

like image 88
Vipul Purohit Avatar answered Oct 15 '22 01:10

Vipul Purohit