我下载了最新的
Android Studio Koala | 2024.1.1 Canary 5
,AS说这个版本只能与android gradle插件一起使用"8.5.0-alpha05"
我更新了agp,然后得到了以下错误。
Querying the mapped value of flatmap(provider(task 'processDebugGoogleServices', class com.google.gms.googleservices.GoogleServicesTask)) before task ':app:processDebugGoogleServices' has completed is not supported
我认为它与谷歌服务有关,但我使用的是最新版本的谷歌服务。
Canary 4 运行完美,所以我不确定问题是什么。
这是版本目录
[versions]
agp = "8.5.0-alpha05"
koinVersion = "3.5.3"
kspKoinVersion = "1.3.1"
kotlin = "1.9.23"
coreKtx = "1.12.0"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
lifecycleRuntimeKtx = "2.7.0"
activityCompose = "1.8.2"
composeBom = "2024.04.00"
conventionalCommitsVersion = "3.1.3"
ktorVersion = "2.3.3"
logbackClassicVersion = "1.2.3"
appcompat = "1.6.1"
material = "1.11.0"
kotlinxSerializationJsonVersion = "1.6.0"
materialIconsExtended = "1.6.5"
serializationVersion = "1.9.0"
jetbrainsKotlinJvm = "1.9.21"
ktfmtVersion = "0.17.0"
coroutinesTest = "1.8.0"
securityCryptoVersion = "1.0.0"
timberVersion = "5.0.1"
lifecycleRuntimeComposeVersion = "2.7.0"
googleServices = "4.4.1"
firebaseAuth = "22.3.1"
material3Android = "1.2.1"
uiTooling = "1.6.4"
voyager = "1.0.0"
kspVersion = "1.9.23-1.0.20"
googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" }
错误消息表明您使用的 Google 服务插件和 Android Gradle 插件 (AGP) 版本存在问题。具体错误与
processDebugGoogleServices
任务有关。
由于您已更新到 AGP 8.5.0-alpha05(需要更新的 Google 服务插件),因此您可能需要进行一些调整。
尝试这些疑难解答(如果这只是一个词的话),如果其中任何一个可以解决您的问题,请告诉我。
对 build.gradle 文件或依赖项进行任何更改后,请记住清理并重建项目。
如果这些解决方案均不起作用,请提供有关您的项目设置和依赖项的更多详细信息,这将增加解决方案成功的可能性。