Android中引用外部工程

要引用的工程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的这个文件,目前没发现问题..

android 引用外部库工程 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值