提问人:R Jin 提问时间:1/18/2022 最后编辑:Phil DukhovR Jin 更新时间:1/18/2022 访问量:152
在我的 gradle 中添加自定义任务后无法清理或构建我的 android 项目,似乎与 Kotlin 多平台依赖项有些冲突
Unable to clean or build my android project after adding custom task in my gradle , seems like some conflict with Kotlin Multiplatform dependency
问:
我需要按照这个答案添加一个自定义任务,在我创建的示例项目的情况下,它完全可以正常工作,但是在我的主项目中,即使我尝试清理项目,我也会遇到错误。 在我的主要项目中,错误似乎 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 构建? 或者我可能完全脱离了这里的上下文。
答: 暂无答案
评论