gpt4 book ai didi

java - [Android map API] : Google-play-services prompting update on phone but not in emulator.

转载 作者:太空宇宙 更新时间:2023-11-04 12:11:06 25 4
gpt4 key购买 nike

在尝试获取用户的位置时,我偶然发现了一个小障碍。在模拟器中尝试代码时,我可以获得位置坐标,并且一切正常。

但是在我的真实手机(具有最新更新的三星 Galaxy s4)上,android studio 运行监视器向我显示以下消息:

W/GooglePlayServicesUtil: Google Play services out of date.  Requires 9683000 but found 8122238
I/AdressPopup: Location services connection failed with code 2

(AdressPopup 是我发生这种情况的类名)。没有坐标,因此无法获取位置。

我在 build.gradle(模块:应用程序)文件中指定了最新的 Google Play 服务版本:

compile 'com.google.android.gms:play-services:9.6.1'

关于可能导致此问题的原因有什么想法吗?

最佳答案

很明显,问题出在我的特定目标设备上。在我更新手机上的 google map 应用程序并在 Google Play 商店上运行更新后(尽管我不确定后者是否有必要),我的应用程序中的位置功能开始工作。

我希望这对遇到同样问题的人有所帮助。

关于java - [Android map API] : Google-play-services prompting update on phone but not in emulator.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39855579/

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