Service not Available - Geocoder Android [duplicate]
问题 This question already has answers here : Why is Android Geocoder throwing a “Service not Available” exception? (6 answers) Closed 6 years ago . I have a little problem with the geocoder to get latitude and lontitude from an address : This is my code: for (Garage g : XMLGarage) { List<Address> address; address = coder.getFromLocationName( g.getAddress(), 5); if (address != null) { Address location = address.get(0); g.setLatitude(location.getLatitude()); g.setLongitude(location.getLongitude());