我怎样才能启用的javadoc对于Android的支持库?javadoc、Android

2023-09-12 07:14:47 作者:寡虎难敌众狼

当使用兼容Android的支持库,并尝试查看javadoc的,比如说, FragmentTransaction ,我收到以下错误,因为没有相关的javadoc文件:

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 no associated javadoc file:

android.support.v4.app.FragmentTransaction

android.support.v4.app.FragmentTransaction

注:该元素既不先后隶属来源,也不附加的Javadoc   因此没有Javadoc中可以找到。

Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.

支持库是在项目属性Android的依赖项下添加,并显示的Javadoc的位置:(无) - 不可修改的,如下图所示。有什么解决方法吗?

The support library is added under the Android Dependencies item in the project properties, and shows Javadoc location: (None) - non-modifiable as shown below. Is there any workaround for this?

推荐答案

我绑在一起了一个项目,Android的支持,v4.jar只是在包装查看的Andr​​oid的依赖关系的一部分。我有一个类

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 {...}

和的进口

import android.support.v4.app.ListFragment;

了上述

我在 android-support-v4.jar.properties 文件夹中的文件。它包含行:

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你必须改变,如果不使用Windows未逃脱斜线。

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

接着右键单击该项目,选择刷新,那么你会得到的Javadoc支持。你并不真正需要的文档录入 - 在src条目已经包含的javadoc。

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.