6

我正在尝试使用 Dokka 从我的 Kotlin 项目中生成文档。我正在使用 0.9.17 版本。

这是我的gradle配置:

dokka {
    includes = ['../README.md']
    outputFormat = 'html'
    outputDirectory = "$buildDir/outputs/doc"

    // Use to include or exclude non public members.
    includeNonPublic = false

    // Do not create index pages for empty packages
    skipEmptyPackages = true

    packageOptions {
        prefix = 'com.app.internal'
        suppress = true
    }
    // No default documentation link to kotlin-stdlib
    noStdlibLink = true
}

要生成文档,我使用以下命令:

./gradlew dokka

但是有一个问题(否则我不会问你^^)。我遇到的问题是:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:dokka'.
> Guice provision errors:

  1) Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=http://docs.oracle.com/javase/6/docs/api/, packageListUrl=http://docs.oracle.com/javase/6/docs/api/package-list)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.<init>(ExternalDocumentationLinkResolver.kt:28)
    at org.jetbrains.dokka.ExternalDocumentationLinkResolver.class(ExternalDocumentationLinkResolver.kt:28)
    while locating org.jetbrains.dokka.ExternalDocumentationLinkResolver
      for parameter 4 at org.jetbrains.dokka.DeclarationLinkResolver.<init>(DeclarationLinkResolver.kt:13)
    while locating org.jetbrains.dokka.DeclarationLinkResolver
      for parameter 0 at org.jetbrains.dokka.PackageDocs.<init>(PackageDocs.kt:13)
    at org.jetbrains.dokka.PackageDocs.class(PackageDocs.kt:12)
    while locating org.jetbrains.dokka.PackageDocs

  1 error

我并不孤单,因为打开了一个错误,原因肯定是因为我在代理后面,但我不知道如何解决这个问题。

你有什么主意吗 ?

4

0 回答 0