2

我需要根据这个答案添加一个自定义任务,并且在我创建的示例项目的情况下它工作得很好,但是在我的主项目中,即使我尝试清理项目,我也会遇到错误。在我的主项目中,错误似乎 Kotlin Multiplatform Module 无法构建和生成 jar 文件。请在下面找到错误

A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
   > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
      > Failed to transform KotlinMultiplatformModule.jar (project :KotlinMultiplatformModule) to match attributes {artifactType=android-filtered-proguard-rules, codeShrinker=R8, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime, org.jetbrains.kotlin.localToProject=public, org.jetbrains.kotlin.platform.type=jvm}.
         > Execution failed for JetifyTransform: path_to_module/build/libs/KotlinMultiplatformModule.jar.
            > Transform's input file does not exist: /path_to_module/build/libs/KotlinMultiplatformModule.jar. (See https://issuetracker.google.com/issues/158753935)
  • 请注意,我已经替换了我的 Kotlin Multiplatform 模块名称。我需要添加一些其他任务来首先构建 jar 吗?或者我可能完全脱离了这里的上下文。
4

0 回答 0