劇情是這樣,我的app要使用兩個library,如:LibraryA,LibraryB。這兩個庫又都需要support.v4.jar。
由於加載的時間不同,所以兩個support.v4.jar不同,出錯的提示如下:
[2012-09-28 16:37:22 - ] Found 3 versions of android-support-v4.jar in the dependency list,
[2012-09-28 16:37:22 - ] but not all the versions are identical (check is based on SHA-1 only at this time).
[2012-09-28 16:37:22 - ] All versions of the libraries must be the same at this time.
[2012-09-28 16:37:22 - ] Versions found are:
[2012-09-28 16:37:22 - ] Path: /home/zkw/workspace/MyApp/libs/android-support-v4.jar
[2012-09-28 16:37:22 - ] Length: 247894
[2012-09-28 16:37:22 - ] SHA-1: 7329492e76650ee661f6af7704b0c79151d8e1ef
[2012-09-28 16:37:22 - ] Path: /home/zkw/workspace/LibraryB/library/libs/android-support-v4.jar
[2012-09-28 16:37:22 - ] Length: 271754
[2012-09-28 16:37:22 - ] SHA-1: 53307dc2bd2b69fd5533458ee11885f55807de4b
[2012-09-28 16:37:22 - ] Path: /home/zkw/workspace/LibraryA/libs/android-support-v4.jar
[2012-09-28 16:37:22 - ] Length: 247894
[2012-09-28 16:37:22 - ] SHA-1: 7329492e76650ee661f6af7704b0c79151d8e1ef
[2012-09-28 16:37:22 - ] Jar mismatch! Fix your dependencies
從提示中可以知道,這三個support-v4.jar不同,所以會發生沖突,解決方法就是,把其中某個不同的,比如LibraryB/library/libs中的support-v4.jar文件刪掉,然后刷新這個包,讓他重新生成,然后就OK了