要引用的工程A,想引用A的工程为B
1、把工程A复制到工程B下
2、在eclipse中导入工程A
3、右键工程A-->Properties-->Android,把Library下方的isLibrary选中-->Apply
4、右键工程B-->同上打开Android-->点击Library下方的Add,在弹出的对话框中会显示之前设置好的工程A,添加即可。
曾试过把A导出为JAR包,然后配置到B中,但不行。
如果有提示如下错误:
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.
Versions found are:
Path: D:\Program Files\Android\eclipse\android\MessageManager\libs\android-support-v4.jar
Length: 393154
SHA-1: 307c1cc532eabbf1d135b43e5c983c9da700449d
Path: D:\Program Files\Android\eclipse\android\MessageManager\library\libs\android-support-v4.jar
Length: 349252
SHA-1: 612846c9857077a039b533718f72db3bc041d389
Jar mismatch! Fix your dependencies我的做法是把B工程中的android-support-v4.jar覆盖工程A的这个文件,目前没发现问题..
本文介绍如何在Eclipse中将一个Android工程A作为另一个工程B的库进行引用的方法,包括复制工程、设置库属性等步骤,并解决依赖冲突问题。
1916

被折叠的 条评论
为什么被折叠?



