Android ADT20+ 关联 libs/*.jar 源码包的方法
2012-12-04 12:33
537 查看
在libs下新建一个与jar同名的properties文件:
eg. commons-httpclient-3.1.jar,然后建立一个
commons-httpclient-3.1.jar.properties 文件
![](http://img.my.csdn.net/uploads/201212/04/1354595908_7643.png)
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
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
![](http://img.my.csdn.net/uploads/201212/04/1354595908_7643.png)
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
相关文章推荐
- Android v22.0.1+ 关联 libs/*.jar 源码包的方法
- Android Eclipse Libs 的 jar 源码查看 (或者新版本ADT无法查看jar的源码)
- android给libs目录jar包添加源码关联
- Eclipse关联Android系统源码的2种方法
- adt怎么关联第三方jar包源码的方法
- android查看第三方libs的jar源码
- Android开发 - 环境搭建及查看android.jar源码的方法
- 关于eclipse中关联各版本Android.jar对应的源代码方法
- [Android] ADT关联源码与API文档 [2013-06-26更新]
- ADT18.0.0之后jar包(support-v4)管理源码的方法
- eclipse 第三方jar包 关联源码,提示 The Jar of this class file belongs to container 'Android Dependencies'
- 【android】在Eclipse中关联所引用的jar包源码
- Java和Android的jar包关联源码的两种方式(图解)
- 关于eclipse中关联各版本Android.jar对应的源代码方法
- Android开发工具ADT关联源码与API文档
- Android开发工具ADT关联源码与API文档
- ADT中添加libs下的jar包,增加了reference library,而没有增加Android private library的
- Android开发在ADT中关联源码
- 关联源码时,jar包中文乱码解决方法
- Android Studio自动关联android源码失败 和 没有方法提示问题