【发布时间】:2019-05-03 02:08:09
【问题描述】:
在我的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-services: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
有什么办法可以解决这次 Android 抱怨的问题吗?
更新 1:我删除了 buildToolsVersion,但我包含了 API 级别 26 的那个:
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
....
....
}
【问题讨论】:
标签: android google-play-services android-api-levels