2010-02-12 34 views
1

我的應用程序正常工作,我使用地理編碼器類檢索位置緯度和longtude地理編碼類沒有在安卓

我的代碼是:

addressInput = street+","+city+","+pin+","+country; 
List<Address> foundAdresses = gc.getFromLocationName(addressInput, 5); 

第一次拋出異常喜歡這個

java.io.IOException的:無法解析從服務器

ERROR/ProtoRequestLis響應特納(566):com.google.common.async.WatchdogException

普萊舍解決它,如果您有任何代碼檢索位置的經度和緯度送我

回答

5

這應該解決您的問題。

List<Address> addresses = 
      new Geocoder(this,Locale.getDefault()).getFromLocation(lat, lon, 1); 
+0

不工作在我的情況下...... :( – Noman 2012-07-25 19:37:24