Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
179 views
in Technique[技术] by (71.8m points)

android - 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 toolswork1Sharelibsandroid-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 toolswork1Android-Featherlibsandroid-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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...