我有两个设备:一个是HTC WildFire S,另一个是HTC 1V。我在我的应用程序中使用了Geocoder.getFromLocationName()
方法。在HTC Wildfire S上它运行得很好。但在HTC 1V上我遇到了以下错误。为什么会出现这种情况?我该如何解决?请问有人可以帮助我吗。
代码
Geocoder geoCoder = new Geocoder(getBaseContext(), Locale.getDefault());
//s is the address
List<Address> addresses = geoCoder.getFromLocationName(s, 5); //Here i got the following Exception.
错误
06-18 16:28:17.933: W/System.err(4960): java.io.IOException: Service not Available
06-18 16:28:17.953: W/System.err(4960):at android.location.Geocoder.getFromLocationName(Geocoder.java:178)
位置选项卡