在我的 gradle 中添加自定义任务后无法清理或构建我的 android 项目,似乎与 Kotlin 多平台依赖项存在冲突

问题描述 投票:0回答:1

我需要根据这个答案添加一个自定义任务,并且在我创建的示例项目中它工作得很好,但在我的主项目中,即使我尝试清理项目,我也会收到错误。 在我的主项目中,错误似乎是 Kotlin 多平台模块无法构建和生成 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 吗? 或者我可能完全脱离了上下文。
android android-gradle-plugin proguard kotlin-multiplatform android-jetifier
1个回答
0
投票

通过 YouTrack 创建票证始终是一个不错的选择: https://youtrack.jetbrains.com/newIssue

© www.soinside.com 2019 - 2024. All rights reserved.