我正在使用Android Studio Canary构建一个新项目,在为jet pack compose设置依赖项时,我得到了以下构建输出:
Execution failed for task ':app:processDebugAndroidTestManifest'.
> Could not resolve all files for configuration ':app:debugAndroidTestRuntimeClasspath'.
> Could not find org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm:0.3.3.
Required by:
project :app > androidx.compose.runtime:runtime:1.0.0-beta02发布于 2021-03-20 03:02:01
将jcenter添加到settings.gradle文件的存储库中。您可以指定仅将其用于此缺失的人工制品。它应该看起来像这样:
repositories {
google()
mavenCentral()
//noinspection JcenterRepositoryObsolete
jcenter {
content {
includeModule("org.jetbrains.kotlinx", "kotlinx-collections-immutable-jvm")
}
}
}发布于 2021-03-19 23:53:20
尝试将jcenter()添加到您的存储库。它正在被逐步淘汰,你会得到一个警告,但目前这是唯一的解决方案。看看这个:https://github.com/ReKotlin/ReKotlin/issues/47
和https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/:“为了澄清,JCenter存储库将继续提供包12个月,直到2022年2月1日。只有JCenter REST API和UI将在2021年5月1日日落。”
发布于 2021-04-14 10:51:40
基于this thread,我通过以下方式从我的Jetpack Compose项目中摆脱了jcenter:
object Collections {
private const val version = "0.3.4"
const val immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm:$version"
}implementation Libs.Collections.immutable用 from
替换
https://stackoverflow.com/questions/66710318
复制相似问题