方法 Geocoder.getFromLocationName()
在 Android 4.1 上抛出异常 Service not available
,即使 GooglePlayServicesUtil.isGooglePlayServicesAvailable()
返回 SUCCESS
和 Geocoder.isPresent()
返回 true
。
在新的 Google Maps v2 API 中是否有任何关于地理编码的官方示例?
最佳答案
Geocoder
与 Google Maps Android API v2 无关。
您可能想使用 Google Geocoding API直接代替 Geocoder
,后者为您提供的数据量有限,并且可能会受到设备或 Android 版本特定问题的影响。
关于android - Geocoder.getFromLocationName() 在带有 Google Maps V2 的 Android 4 上抛出 "Service not available"异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16655549/