Android libsでのソースコードとドキュメント構成

2090 ワード

Android libsでのソースコードとドキュメント構成
2013年9月9日
に仕える
android開発
Go to comment
adtを22にアップグレードしてからandroidプロジェクトlibsのサードパーティ製パッケージは手動で追加する必要がなく、eclipseはcomを通過します.android.ide.eclipse.adt.LIBRARIESはディレクトリAndroid Private Librariesに自動的に追加されますが、ピットのお父さんはandroidがsourceを設定できる以外、他のディレクトリの下で設定を編集できません.
androidの発展に伴い、より多くの良いオープンソースプロジェクトが絶えず提供され、私たちに使用されています.第3のソースコードを見たい学生たちにとって、これは残酷です.のそしてhttps://code.google.com/p/android/issues/detail?id=27490#c21では、21階の店員が次の方法を提供しているのを見ました.
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. 吼吼~~~基本的な設定フローは、例えば、プロジェクトにlibsディレクトリがあり、android-support-v 4がある.JAr、対応するソースコードとドキュメントを/home/marsuu/libsrc/android-support-v 4_に置きます.source.JArおよび/home/marsuu/libdoc/android-support-v 4_doc.JArディレクトリの下
ではlibsディレクトリの下に新しいファイルandroid-support-v 4を作成します.jar.propertiesオープン編集src= /home/marsuu/libsrc/android-support-v4_source .jar doc= /home/marsuu/libsrc/android-support-v4_doc .jar
プロジェクトを保存、閉じるeclipseを再開または再起動すると、開発中にソースファイルを直接表示できますよ~~