【发布时间】:2021-01-30 07:00:51
【问题描述】:
我对这个问题感到非常困惑。我的 gradle 文件中有以下几行:
implementation "androidx.compose.runtime:runtime:1.0.0-alpha04"
implementation "androidx.compose.compiler:compiler:1.0.0-alpha04"
implementation "androidx.compose.runtime:runtime-rxjava2:1.0.0-alpha04"
但是,当我构建时,我收到以下错误:
Could not determine the dependencies of task ':app-name-omitted:prepareDebugKotlinCompileTask'.
> Could not resolve all task dependencies for configuration ':app-name-omitted:kotlin-extension'.
> Could not find androidx.compose:compose-compiler:1.0.0-alpha04.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/androidx/compose/compose-compiler/1.0.0-alpha04/compose-compiler-1.0.0-alpha04.pom
- https://repo.maven.apache.org/maven2/androidx/compose/compose-compiler/1.0.0-alpha04/compose-compiler-1.0.0-alpha04.pom
- https://jcenter.bintray.com/androidx/compose/compose-compiler/1.0.0-alpha04/compose-compiler-1.0.0-alpha04.pom
Required by:
project :app-name-omitted
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
我对此感到困惑,因为编译器确实存在于 Google 的存储库中:https://maven.google.com/web/index.html#androidx.compose.compiler:compiler
如有必要,我可以发布更多信息,但我想保持简单。即使compose设置完全错误,为什么找不到POM文件?
【问题讨论】:
-
忘了说明我使用的是 Android Studio 4.2,Canary 13
-
您使用的是哪个版本的
com.android.tools.build:gradle?这也是4.2.0-alpha13吗? -
@ianhanniballake 是的,是的
-
@MarkHerscher 有什么更新可以解决这个问题吗?我也停留在那个时候:(
标签: android android-gradle-plugin android-jetpack-compose