简体   繁体   English

[Android Maps API]:Google-play-services提示在手机上更新但不在模拟器中更新。

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

I've stumbled upon a little barrier when trying to get the location of a user. 在尝试获取用户的位置时,我偶然发现了一点障碍。 While trying the code in the emulator, I can get location coordinates and everything works perfectly. 在模拟器中尝试代码时,我可以获得位置坐标,一切都很完美。

However on my real phone (Samsung galaxy s4 with latest updates), the android studio run-monitor gives me the following message: 然而,在我的真实手机(三星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 being my classname where this occurs). (AdressPopup是我发生这种情况的类名)。 No coordinates and thus no location can be acquired as such. 没有坐标,因此不能获得这样的位置。

I have the latest build for google play services specified in my build.gradle (module: app) file: 我在build.gradle(module:app)文件中指定了google play服务的最新版本:

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

Any ideas on what might be causing this problem? 关于可能导致这个问题的任何想法?

So apparently the problem was my specific targeted device. 显然问题是我的特定目标设备。 After I updated the google maps app on my phone and ran an update on the google play store (although I'm not sure if the latter was necessary), the location function in my app started working. 我在手机上更新谷歌地图应用程序并在谷歌游戏商店运行更新(虽然我不确定后者是否有必要),我的应用程序中的位置功能开始工作。

I hope this helps anyone who stumbles upon the same problem. 我希望这可以帮助任何偶然发现同样问题的人。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 google-play-services不会在Eclipse的Android Maps HelloWorld项目中内置 - google-play-services won't build into Android Maps HelloWorld project in Eclipse 谷歌钱包服务错过了谷歌钱包服务 - Google Wallet API miss in google-play-services 使用Google Maps Api V2时,Android 2.2或4.1.2模拟器上的Google Play服务缺失 - Google Play Services Missing on Android 2.2 or 4.1.2 Emulator while using Google Maps Api V2 如何在Aar包中的android库模块中包括google-play-services库作为可选 - How to include google-play-services library in android library module in aar package as optional 在真实的设备/模拟器上显示Google Maps API v2。 无法找出错误 - displaying Google Maps API v2 on real device/emulator. can't figure out error 使用Maven Android失败:com.google.android.gms的POM:google-play-services:jar:13.0.0缺失,没有相关信息可用 - Failure with Maven Android : The POM for com.google.android.gms:google-play-services:jar:13.0.0 is missing, no dependency information available 任何google-play-services功能的java.lang.NoClassDefFoundError - java.lang.NoClassDefFoundError for any google-play-services feature 使用Google Maps API“除非您更新Google Play服务,否则应用程序将无法运行” - “App won't run unless you update Google Play services” with Google Maps API Android:可以在模拟器上使用Google Maps API吗? - Android: Is it possible to use Google Maps API on emulator? 使用Google-play-services jar文件的两个Adobe Air本机扩展 - two adobe air native extensions using google-play-services jar file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM