How can I enable javadoc for the Android support library?

前端 未结 3 1812
南笙
南笙 2020-12-02 19:47

When using the Android support library for compatibility and try to view the javadoc for, say, FragmentTransaction, I get the following error because there is n

3条回答
  •  爱一瞬间的悲伤
    2020-12-02 20:48

    I've lashed together a project with android-support-v4.jar just in the Android Dependencies part of the package view. I have a class

    public class CountriesFragment extends ListFragment {...}
    

    and an import of

    import android.support.v4.app.ListFragment;
    

    up above

    I created a file android-support-v4.jar.properties in the libs folder. It contains the lines:

    doc=c:\\[path-to-android-sdk]\\docs\\reference
    src=C:\\[path-to-android-sdk]\\extras\\android\\support\\v4\\src
    

    Presumably you'll have to change to un-escaped forward slashes if not using Windows.

    Next right-click the project, select refresh, then you'll get javadoc support. You don't really need the doc entry--the src entry already contains the javadocs.

提交回复
热议问题