在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
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