gpt4 book ai didi

android - 错误 :(280, 61) 找不到错误 : cannot access zza class file for com. google.android.gms.common.internal.safeparcel.zza

转载 作者:行者123 更新时间:2023-11-29 00:57:31 26 4
gpt4 key购买 nike

在我的 build.gradle 中,我使用了这个:

android {
compileSdkVersion 23
....
....
defaultConfig {
....
targetSdkVersion 23
}
}
....
....
dependencies {
compile 'com.google.android.gms:play-services:9.0.0'
....
....
}

一切对我来说都编译正确,我正在将我的应用程序发布到 Google Play 商店,令我惊讶的是,谷歌没有让我发布它,因为我使用的是 targetSdkVersion 23 并且他们希望我至少使用 targetSdkVersion 26。我继续更改我的代码以使用 targetSdkVersion 26 并且我看到的错误表明 targetSdkVersion 26 至少需要 com.google.android.gms:play-服务:10.2.1 或更高版本。我将代码更改为:

android {
compileSdkVersion 26
....
....
defaultConfig {
....
targetSdkVersion 26
}
}
....
....
dependencies {
compile 'com.google.android.gms:play-services:10.2.1'
....
....
}

这次的错误信息是:

Error:(280, 61) error: cannot access zza class file for com.google.android.gms.common.internal.safeparcel.zza not found

enter image description here

有什么想法可以解决 Android 这次提示的问题吗?

更新 1:我删除了 buildToolsVersion 但我包含了 API 级别 26 的那个:

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
....
....
}

最佳答案

您需要将 firebase-messaging 升级到最新版本

我升级到实现 'com.google.firebase:firebase-messaging:17.6.0'

而且效果非常好。

注意:始终使用最新版本。

关于android - 错误 :(280, 61) 找不到错误 : cannot access zza class file for com. google.android.gms.common.internal.safeparcel.zza,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53565663/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com