2011-04-18 40 views
3

我的Android和Java技能是没有这么热......Geocoder.isPresent()未定义类型地理编码

在对地理编码器的developer.android.com页面,它说:

如果平台中没有后端服务,Geocoder查询方法将返回一个空列表。使用isPresent()方法来确定Geocoder实现是否存在。

然而,当我尝试调用,例如:

if (Geocoder.isPresent()) {... 

Eclipse的告诉我

的方法isPresent()是未定义的类型地理编码

我如何“使用isPresent()方法”?

+0

您是否导入了google maps api库?这对你有帮助http://developer.android.com/guide/topics/location/index.html – chaitanya 2011-04-18 19:17:18

回答