Android ADT20+ 关联 libs/*.jar 源码包的方法

在libs下新建一个与jar同名的properties文件:

eg. commons-httpclient-3.1.jar,然后建立一个 commons-httpclient-3.1.jar.properties 文件


src:源码包路径

doc:doc包路径

eg.

src:/tools/android-sdk-macosx/commons-httpclient-3.1-src.zip
doc:/tools/android-sdk-macosx/commons-httpclient-3.1-doc.zip



Restart eclipse.

Comment 21 by project member x...@android.com, Apr 23, 2012
The source attachement in fixed for r20.
If you have library projects you should see the source for those automatically.

As for the original issue in this bug:
- if you want to manually reference libraries in your project, you need to make them exported. If the project is a library then project referencing your library will *not* have access to those libraries.
- adding them to libs/ is the way to have dependencies be automatically resolved when you have several libraries, all depending on 3rd party libs (some of which may be the same or may be conflicting with each other).

Source attachement: to work with the new dependency system, we need to put the source attachement outside of the eclipse config.
Next to any jar files in libs/ simply put a .properties file (foo.jar -> foo.jar.properties). This properties file currently support two properties:

src: relative or absolute path to the source folder (or archive).
doc: relative or absolute path to the javadoc.

The properties file is a standard Java properties file, using  ISO 8859-1 character encoding.

http://code.google.com/p/android/issues/detail?id=27490#c21

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值