Geocoder gc = new Geocoder(this, Locale.getDefault());
이 부분에서 no suggestion available 오류문구가 뜹니다.
해결할수 있는 방법이 없다는것 같은데..
이거 왜 뜰까요 ㅠ_ㅠ
if(location != null) {
double lat = location.getLatitude();
double lng = location.getLongitude();
latLongString = "위도 : " + lat + "\n경도 : " + lng;
Geocoder gc = new Geocoder(this, Locale.getDefault());
try {
List<Address> addresses = gc.getFromLocation(lat, lng, 1);
StringBuilder sb = new StringBuilder();
if(addresses.size()>0){
Address address = addresses.get(0);
for (int j = 0; j < address.getMaxAddressLineIndex(); j++) {
sb.append(address.getAddressLine(j)).append("\n");
sb.append(address.getLocality()).append("\n");
sb.append(address.getPostalCode()).append("\n");
sb.append(address.getCountryName());
}
addressString = sb.toString();
}
} catch(IOException e) {}
} else {
latLongString = "위치를 찾을 수 없음";
}




Locale에 대하여 다음과 같은 설명이 보입니다.
Geocoder gc = new Geocoder(this);
를 사용해 보시거나,
테스트를 위해 en_US Locale을 사용해 보시는 것은 어떨까요?
Geocoder gc = new Geocoder(this, Locale.US);
Available locales
This class' constructors do no error checking. You can create a
Localefor languages and countries that don't exist, and you can create instances for combinations that don't exist (such as "de_US" for "German as spoken in the US").Note that locale data is not necessarily available for any of the locales pre-defined as constants in this class except for en_US, which is the only locale Java guarantees is always available.