You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android SDK Google Play Service最新更新及无SDKManager直接下载咨询(含依赖错误)

解决Google Play Services GCM依赖问题及无官方工具下载方案

Hey there, let's work through your Google Play Services SDK problem step by step!

1. 关于Google Play Services GCM的最新情况

First off, it's important to note that Google deprecated GCM (Google Cloud Messaging) a while back, folding its functionality into FCM (Firebase Cloud Messaging). The play-services-gcm dependency stopped receiving updates after the 12.0.x series—so versions like 12.0.+ are no longer maintained, and might even be removed from official repositories, which is likely why you're seeing that Failed to resolve error.

Right now, the actively supported alternative is Firebase Messaging, with the latest stable version being 23.4.0 as of mid-2024. It offers all the features of GCM plus improvements, so migrating is the long-term fix here.

2. 不使用SDK Manager/谷歌官方站点的下载方案

If you really need the old play-services-gcm package and can't use SDK Manager or Google's official sites, here's how to get it directly:

  • The last stable version in the 12.0 series is 12.0.1. You can grab its AAR (Android Archive) file from public Maven repository mirrors:
    • Search for com.google.android.gms:play-services-gcm:12.0.1 on any public Maven mirror (like common domestic mirrors for easier access)
    • Download the play-services-gcm-12.0.1.aar file
  • Keep in mind: this dependency relies on other supporting packages, so you'll also need to download these AARs the same way:
    • play-services-basement:12.0.1
    • play-services-tasks:12.0.1
  • Once you have all the AAR files, move them to your project's libs folder, then add these lines to your app-level build.gradle to use local dependencies:
    implementation files('libs/play-services-gcm-12.0.1.aar')
    implementation files('libs/play-services-basement-12.0.1.aar')
    implementation files('libs/play-services-tasks-12.0.1.aar')
    

3. 更推荐的长期解决方案:迁移到FCM

Since GCM is no longer supported, migrating to FCM will save you from future dependency issues. Here's the quick setup:

  1. Remove the old com.google.android.gms:play-services-gcm:12.0.+ line from your build.gradle
  2. Add the FCM dependency:
    implementation 'com.google.firebase:firebase-messaging:23.4.0'
    
  3. Follow standard FCM setup steps: add your google-services.json file to the app directory, configure the messaging service in your AndroidManifest, etc.

内容的提问来源于stack exchange,提问作者AhmadReza Molaei

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:28:19