Android 在主项目中显示注释

Android 在主项目中显示注释,android,android-gradle-plugin,aar,Android,Android Gradle Plugin,Aar,我有一个库,其中包含我编写注释的方法。这里有一种方法: /** * Delete Connection. * Result is returned through callback. * * @param customerSecret - current Customer secret code * @param connectionSecret - secret code of the Connection which should be de

我有一个库,其中包含我编写注释的方法。这里有一种方法:

/**
     * Delete Connection.
     * Result is returned through callback.
     *
     * @param customerSecret - current Customer secret code
     * @param connectionSecret - secret code of the Connection which should be deleted if exist
     * @param callback - callback for request result
     */
    public void deleteConnection(String customerSecret,
                                 String connectionSecret,
                                 DeleteEntryResult callback) {
        new ConnectionDeleteConnector(callback).deleteConnection(customerSecret, connectionSecret);
    }
但是,当我在主项目中使用此方法时,我没有看到以下注释:

public void deleteConnection(String customerSecret, String connectionSecret, DeleteEntryResult callback) {
    (new ConnectionDeleteConnector(callback)).deleteConnection(customerSecret, connectionSecret);
}

问:如何在项目中显示注释?

解决了我的问题

配方很简单:

注释要查看注释的方法

build.gradle
中编写任务以选择要记录的类:

task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'

    include("**/SomeClass.java")
}
artifacts {
    archives sourcesJar
}

之后,重新构建库,一切正常。

复制粘贴它。或者不要,因为它将与更改不同步。用户应该引用基类的版本。使用Javadoc,将自动为继承的函数创建一个部分,并且应该从基类中获取该部分。如果您想对这个版本的具体实现细节发表意见,您应该只在这里放文档。@Gabeschen可能有一个例子可以说明如何正确操作?用不太清楚的话来说,我仍然不明白如何做到这一点