在引用了别的android项目后项目红叉,并且console报“Jar mismatch!”即引用不一致

来源:互联网 发布:淘宝店logo尺寸大小 编辑:程序博客网 时间:2024/04/29 07:25

当我们的android项目引用了别的项目时(例引用了actionbarsherlock项目),项目前边顶着一个大红叉,但是项目中的所有具体文件却没有错误,并且在控制台报“Jar mismatch!”。

经查是因为两个项目引用了不同的jar包(例android-support-v?.jar,导致编译时冲突时系统报错:“Found 2 versions of android-support-v4.jar in the dependency list,but not all the versions are identical (check is based on SHA-1 only at this time).All versions of the libraries must be the same at this time.”,并且在引用了外部项目后Android Private Libraries连带libs中的jar包(例android-support-v?.jar)引用会消失。

具体的解决办法:统一两个项目的引用jar包android-support-v?.jar),可以将外部项目的jar包(例android-support-v?.jar)覆盖当前项目中的jar包android-support-v?.jar)。


0 0
原创粉丝点击