0
Until last week this code that I had made was going well, until today I went to test again and I see this:
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
The code stops executing at the moment it makes this request:
List<Address> addresses = geoCoder.getFromLocationName(endereco, 1);
you already have that permission
– Enzo Tiezzi
@Enzotiezzi, Ioexception is an Exception, when you cannot save to disk, or there is some error while saving to disk. In your case only happens in a specific case?
– Fernando Leal
did not happen, previously everything ran perfect, but today I went to test put an address to get the lat and long, and fell into this.
– Enzo Tiezzi
any address I try, it gives this Exception
– Enzo Tiezzi
so much that now, suddenly, it’s back up and I don’t know why
– Enzo Tiezzi
@Enzotiezzi. There is the possibility that it is a problem in your network. Try to test in another network. Or maybe even on Google service (unlikely, since it is stable).
– Fernando Leal
then, I raised these points, and will make an error treatment for the user end up trying again.
– Enzo Tiezzi