首页 > 代码库 > Android项目引用2个以上library project 时的报错
Android项目引用2个以上library project 时的报错
[2012-11-24 11:33:58 - myProject] Found 2 versions of android-support-v4.jar in the dependency list,
[2012-11-24 11:33:58 - myProject] but not all the versions are identical (check is based on SHA-1 only at this time).
[2012-11-24 11:33:58 - myProject] All versions of the libraries must be the same at this time.
[2012-11-24 11:33:58 - myProject] Versions found are:
[2012-11-24 11:33:58 - myProject] Path: E:\adt-bundle-windows-x86-20131030\eclipse\d\workspace\TestAndroidHelper\libs\android-support-v4.jar
[2012-11-24 11:33:58 - myProject] Length: 627582
[2012-11-24 11:33:58 - myProject] SHA-1: db0f122c99ef9f90dbab3fada6d191f2880cbb8e
[2012-11-24 11:33:58 - myProject] Path: E:\Project\框架项目\my-dynamicload\myProjectDL\myMobilePay_out\libs\android-support-v4.jar
[2012-11-24 11:33:58 - myProject] Length: 484258
[2012-11-24 11:33:58 - myProject] SHA-1: bd6479f5dd592790607e0504e66e0f31c2b4d308
[2012-11-24 11:33:58 - myProject] Jar mismatch! Fix your dependencies
错误日志:如上;
错误现象:主工程libs下的jar包在build path -> Libraries 的Android Private Libraries下全部消失;
错误原因:主工程引用的2个library project中,都用到了不同版本的相同jar包,造成主工程这里发生冲突。
错误解决:2个library project的其中1个,在build path -> Libraries 的Order and Export中不导出上述引发冲突的jar包即可。
Android项目引用2个以上library project 时的报错