From 710a597454a487102dfa9eabbe75b01f4a254e7d Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Wed, 6 Sep 2023 21:36:47 +0800 Subject: [PATCH] docs: update guide --- docs/guide-zh-CN.md | 6 ++++++ docs/guide.md | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/docs/guide-zh-CN.md b/docs/guide-zh-CN.md index b924862..4cf26cf 100644 --- a/docs/guide-zh-CN.md +++ b/docs/guide-zh-CN.md @@ -80,6 +80,12 @@ plugins { 上述配置完成后,运行一次 Gradle Sync。 +**可能遇到的问题** + +如果在运行 Gradle Sync 后失败并报错 `Cannot have abstract method KotlinTarget. withSourcesJar()`,这可能是你当前项目的 Kotlin 插件版本的问题。 + +此问题为 Kotlin 插件从 `1.8.0+` → `1.9.0+` 升级导致的错误,解决方案为将 Kotlin 插件的版本修改为 `1.9.0+`。 + **特别注意** `SweetDependency` 会替换 `pluginManagement` 和 `dependencyResolutionManagement` 中设置的存储库,如果你手动在这些方法块中配置了存储库,它们都将会无效。 diff --git a/docs/guide.md b/docs/guide.md index 603c71c..7b1e819 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -81,6 +81,15 @@ Please replace `` in the above code with the latest version in After the above configuration is complete, run Gradle Sync once. +**Possible Problems** + +If running Gradle Sync fails with the error `Cannot have abstract method KotlinTarget. withSourcesJar()`, +this may be a problem with the Kotlin plugin version of your current project. + +This problem is an error caused by upgrading the Kotlin plugin from `1.8.0+` → `1.9.0+`. + +The solution is to modify the version of the Kotlin plugin to `1.9.0+`. + **Pay Attention** `SweetDependency` will replace the repositories set in `pluginManagement` and `dependencyResolutionManagement`,