Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/195.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何向文档添加第三方库引用_Android_Kotlin_Kotlin Dokka - Fatal编程技术网

Android 如何向文档添加第三方库引用

Android 如何向文档添加第三方库引用,android,kotlin,kotlin-dokka,Android,Kotlin,Kotlin Dokka,我已经在top build.gradle中实现了dokka apply plugin: 'org.jetbrains.dokka-android' dokka { // These tasks will be used to determine source directories and classpath // see https://github.com/Kotlin/dokka/blob/master/README.md kotlinTasks {

我已经在top build.gradle中实现了dokka

apply plugin: 'org.jetbrains.dokka-android'

dokka {
    // These tasks will be used to determine source directories and classpath
    // see https://github.com/Kotlin/dokka/blob/master/README.md
    kotlinTasks {
        defaultKotlinTasks() + [':core:compileDebugKotlin']
    }
}
在核心模块中,我有需要记录的接口:

import com.f2prateek.rx.preferences2.RxSharedPreferences

/**
 * Интерфейс для работы с [android.content.SharedPreferences] с помощью [RxSharedPreferences]
 *
 * @property prefs Свойство для доступа к [android.content.SharedPreferences] через [RxSharedPreferences]
 * @see RxSharedPreferences
 */
interface FeaturePrefs {
    val prefs: RxSharedPreferences
}
当我运行dokka任务时,我收到了警告

Can't find node by signature `com.f2prateek.rx.preferences2.RxSharedPreferences`, referenced at my.package.FeaturePrefs (FeaturePrefs.kt:5)
有没有办法在文档中使用第三方库?我想将其配置为引用github源代码()。 已经尝试通过“externalDocumentationLink”对其进行配置,但运气不佳,无法找到任何引用此库的javadoc/包列表

如果您单击文档中的android.content.SharedReferences,您将被重定向到,我希望实现rxprefs的相同行为(重定向到github)

UPD:dokka配置从root build.gradle移动到应用程序的:

apply plugin: 'org.jetbrains.dokka-android'

dokka {
    externalDocumentationLink {
        url = new URL("http://reactivex.io/RxJava/javadoc/")
    }
    externalDocumentationLink {
        url = new URL("http://jakewharton.github.io/timber/")
    }
    externalDocumentationLink {
        url = new URL("https://dagger.dev/api/2.0/")
    }

    Set<ProjectDependency> deps =
        project.configurations.collectMany {
            it.allDependencies
        }.findAll {
            it instanceof ProjectDependency
        }

    sourceDirs = files(deps.collect {
        p ->
            def path = new File(p.getDependencyProject().projectDir, "/src/main/java")
        return path
    })
}

也许在这种依赖关系上不可能有链接? 我希望只记录我的代码,但有框架和第三方依赖的外部链接,这是真的吗

Can't find node by signature `javax.inject.Provider`
Can't find node by signature `androidx.fragment.app.Fragment`