Até semana passada esse código que eu havia feita estava dando tudo certo, até que hoje fui testar de novo e me aparece isto:
05-28 08:22:12.851: E/AndroidRuntime(19605): FATAL EXCEPTION: main
05-28 08:22:12.851: E/AndroidRuntime(19605): java.lang.IllegalStateException: Could not execute method of the activity
05-28 08:22:12.851: E/AndroidRuntime(19605): at android.view.View$1.onClick(View.java:3660)
05-28 08:22:12.851: E/AndroidRuntime(19605): at android.view.View.performClick(View.java:4162)
05-28 08:22:12.851: E/AndroidRuntime(19605): at android.view.View$PerformClick.run(View.java:17088)
05-28 08:22:12.851: E/AndroidRuntime(19605): at android.os.Handler.handleCallback(Handler.java:615)
05-28 08:22:12.851: E/AndroidRuntime(19605): at android.os.Handler.dispatchMessage(Handler.java:92)
05-28 08:22:12.851: E/AndroidRuntime(19605): at android.os.Looper.loop(Looper.java:137)
05-28 08:22:12.851: E/AndroidRuntime(19605): at android.app.ActivityThread.main(ActivityThread.java:4867)
05-28 08:22:12.851: E/AndroidRuntime(19605): at java.lang.reflect.Method.invokeNative(Native Method)
05-28 08:22:12.851: E/AndroidRuntime(19605): at java.lang.reflect.Method.invoke(Method.java:511)
05-28 08:22:12.851: E/AndroidRuntime(19605): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
05-28 08:22:12.851: E/AndroidRuntime(19605): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
05-28 08:22:12.851: E/AndroidRuntime(19605): at dalvik.system.NativeStart.main(Native Method)
05-28 08:22:12.851: E/AndroidRuntime(19605): Caused by: java.lang.reflect.InvocationTargetException
05-28 08:22:12.851: E/AndroidRuntime(19605): at java.lang.reflect.Method.invokeNative(Native Method)
05-28 08:22:12.851: E/AndroidRuntime(19605): at java.lang.reflect.Method.invoke(Method.java:511)
05-28 08:22:12.851: E/AndroidRuntime(19605): at android.view.View$1.onClick(View.java:3655)
05-28 08:22:12.851: E/AndroidRuntime(19605): ... 11 more
05-28 08:22:12.851: E/AndroidRuntime(19605): Caused by: java.io.IOException: Unable to parse response from server
05-28 08:22:12.851: E/AndroidRuntime(19605): at android.location.Geocoder.getFromLocationName(Geocoder.java:178)
05-28 08:22:12.851: E/AndroidRuntime(19605): at in.wptrafficanalyzer.locationdistancetimemapv2.MainActivity.getLatLng(MainActivity.java:131)
05-28 08:22:12.851: E/AndroidRuntime(19605): at in.wptrafficanalyzer.locationdistancetimemapv2.MainActivity.goTo(MainActivity.java:149)
05-28 08:22:12.851: E/AndroidRuntime(19605): ... 14 more
O código para de executar no momento que ele faz essa requisição:
List<Address> addresses = geoCoder.getFromLocationName(endereco, 1);