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

Android Google Maps SDK突发空白灰屏(50%设备受影响)求解决方案

Google Maps SDK 18.2.0 空白灰屏问题(关联Google Play Services 24.16.16更新)

问题描述

我的Android应用集成的Google Maps SDK版本为18.2.0,此前运行一切正常,但自2024年5月14日起,约50%的设备打开应用后显示底部带有Google标识的空白灰色屏幕。

  • 测试发现,清除Google Play Services缓存后地图可正常显示,但用户使用设备一段时间后问题会再次出现,推测是缓存中的某些数据导致该问题,但要求用户手动清除缓存并非可行方案。
  • 注意到Google于5月13日发布了Google Play Services新版本(版本号24.16.16),怀疑问题与此更新存在关联。
  • 未在设备Logcat中发现相关异常日志。

应用配置详情

  • compileSdkVersion: 34
  • minSdkVersion: 23
  • targetSdkVersion: 34
  • Java版本: 1.8
  • Maps SDK依赖: com.google.android.gms:play-services-maps:18.2.0
  • Play Services SDK依赖: com.google.android.gms:play-services-location:21.0.1
  • Google Services插件: com.google.gms.google-services
  • Gradle版本: gradle-7.5-bin.zip
  • 硬件加速配置: android:hardwareAccelerated="true"

Gradle buildscript 内容

buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.3'
        classpath 'com.google.gms:google-services:4.3.10'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0'
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
        classpath 'org.jetbrains.kotlin:kotlin-android-extensions:1.6.10'
        classpath 'com.github.kezong:fat-aar:1.3.8'
    }
}

已尝试的无效方案

  • 降级Google Maps SDK版本
  • 修改Gradle版本和Google Services版本
  • 使用其他Map API密钥
  • 确认Maps API已启用、计费配置正常

求助

是否有其他开发者遇到过此类问题?有没有可行的解决方案?


内容的提问来源于stack exchange,提问作者M. Marmor

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.24 01:17:10