首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找错jetpack组合编译器找不到androidx.compose:compose-compiler:1.0.0-alpha11

找错jetpack组合编译器找不到androidx.compose:compose-compiler:1.0.0-alpha11
EN

Stack Overflow用户
提问于 2021-02-14 22:15:44
回答 1查看 2.6K关注 0票数 0

我在一个android项目中得到了这个错误。

代码语言:javascript
复制
Could not find androidx.compose:compose-compiler:1.0.0-alpha11.
 Searched in the following locations:
   - https://maven.google.com/androidx/compose/compose-compiler/1.0.0-alpha11/compose-compiler-1.0.0-alpha11.pom
   - https://jcenter.bintray.com/androidx/compose/compose-compiler/1.0.0-alpha11/compose-compiler-1.0.0-alpha11.pom
   - https://repo.maven.apache.org/maven2/androidx/compose/compose-compiler/1.0.0-alpha11/compose-compiler-1.0.0-alpha11.pom

如您所见,我在教程的基础上添加了google存储库。

构建级配置如下:

build.gradle.kts

代码语言:javascript
复制
dependencies {
val composeVersion = "1.0.0-alpha11"
//val composeVersion = "0.1.0-dev10"
implementation(project(":shared"))
//implementation ("androidx.compose.runtime:runtime:$composeVersion")
//implementation ("androidx.compose.compiler:compiler:$composeVersion")
implementation("com.google.android.material:material:1.2.1")
implementation("androidx.appcompat:appcompat:1.2.0")
implementation("androidx.constraintlayout:constraintlayout:2.0.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2")


implementation ("androidx.compose.ui:ui:$composeVersion")
// Tooling support (Previews, etc.)
//implementation ("androidx.compose.ui:ui-tooling:$composeVersion")
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
implementation ("androidx.compose.foundation:foundation:$composeVersion")
// Material Design
implementation ("androidx.compose.material:material:$composeVersion")
// Material design icons
implementation ("androidx.compose.material:material-icons-core:$composeVersion")
implementation ("androidx.compose.material:material-icons-extended:$composeVersion")
// Integration with observables
implementation ("androidx.compose.runtime:runtime-livedata:$composeVersion")
implementation ("androidx.compose.runtime:runtime-rxjava2:$composeVersion")

 //UI Tests
//androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.0.0-alpha10'
}

android {
   compileSdkVersion(29)
   defaultConfig {
    applicationId = "com.myTempOrg.myTestApp.androidApp"
    minSdkVersion(24)
    targetSdkVersion(29)
    versionCode = 1
    versionName = "1.0"
}
buildFeatures {
    compose = true
}

composeOptions {
    kotlinCompilerVersion = "1.4.21"
    kotlinCompilerExtensionVersion = "1.0.0-alpha11"
}

kotlinOptions {
    jvmTarget = "1.8"
    useIR = true
}

我还尝试将alpha03降级为似乎被找到的,但在那里发现了另一个缺少依赖项的问题。

EN

回答 1

Stack Overflow用户

发布于 2021-02-15 13:33:08

对于alpha 11,kotlinCompilerVersion应该是"1.4.21-2“。

请注意,alpha 12现已退出,您可以使用以下依赖项进行升级:链接到alpha 12依赖项

您还需要添加以下内容:链接到更新到alpha 12的进一步说明

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66200656

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档