我正在尝试执行以下代码,但发生错误:
public void OnLocationChanged(Location location) {
var lat = (TextView)FindViewById<TextView> (Resource.Id.latitude);
var lon = (TextView)FindViewById<TextView> (Resource.Id.longitude);
var data = (TextView)FindViewById<TextView> (Resource.Id.info1);
var act = (TextView)FindViewById<TextView> (Resource.Id.info2);
var excep = (TextView)FindViewById<TextView> (Resource.Id.Excep);
lat.Text = string.Format ("Latitude : {0:N5}", location.Latitude);
lon.Text = string.Format ("Longitude : {0:N5}", location.Longitude);
Geocoder geocode = new Geocoder (this);
Task<Address> getAddressTask = geocode.GetFromLocationAsync (location.Latitude, location.Longitude, 5);
IList<Address> addresses = await getAddressTask;
}
错误 CS0117“Android.Locations.Geocoder”不包含“GetFromLocationAsync”的定义
请帮我解决一下这个。