现在,我试图让一个地区的国家名字,但我无法通过LatLng在getFromLocation()。我怎样才能解决这个问题?
public void checkCountry(LatLng location) {
Geocoder gcd = new Geocoder(this, Locale.getDefaut());
List<Address> addresses = gcd.getFromLocation(location.latitude, location.logtitude, 1); //error here
String country = addresses.get(0).getCountryName();
错误说
未处理的异常:java.IO.Exception
getFromLocation() 不能应用于:纬度双位置。纬度经度双位置。经度
我有什么问题吗?
手掌心
相关分类