2011-12-08

Tags: 程式語言 , android

以前寫Android app,想把android.jar這個核心jar檔的source code給掛到eclipse project裡還蠻麻煩的,要自己用git去抓官方的andorid source,然後用一些有的沒的方式才可以把它掛到project裡。沒想到現在已經有這方面現成的plugin可用了,真是究干心。

相關資訊在 這裡,有需要的人可以照裡面寫的步驟去把它裝起來。其中比較重要的一些內容節錄如下。

==================================================================
Android Sources

This plugin helps you to add source to android libraries in Eclipse.

In ADT >=8.0.0 you can add Android sources to Android container for all your project with installing the Android source feature using http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/ update site After installing the Android source feature all your existing projects as well as new created projects which is targeted for Android 2.3.4, 2.3, 2.2, 2.1, 2.0.1, 1.6 and 1.5 will have attached the source jar.

The plugin includes sources for the following API levels:

    10 - Android 2.3.4
    9 - Android 2.3
    8 - Android 2.2
    7 - Android 2.1
    6 - Android 2.0.1
    4 - Android 1.6
    3 - Android 1.5

The plugin is about 170 MB size.
==================================================================

裝完後執行起來的screenshot像下面這樣。這真是個實用的好東東...:)