We are developing an android application in eclipse. We have a web service on one of our computer that the app gets its data from.
During the debug in a sony Xperia Z1 mobile the debugger behaves weird. it skips lines and in a try/catch statement after entering the first command it goes directly to finally.
The code is below
1 // Make the request.
> 2 CloseableHttpResponse httpResponse = null;
3 try {
> 4 httpResponse = httpClient.execute(httpPost, context);
5 // Set status.
> 6 response.setStatus(httpResponse.getStatusLine().getStatusCode());
7 // Read the body.
> 8 response.setBody(EntityUtils.toString(httpResponse.getEntity(), "UTF-8"));
9 // Get the cookies.
10 response.setCookieList(context.getCookieStore().getCookies());
11 } catch (IOException ex) {
12 // logger.error("", ex);
13 } finally {
> 14 if (httpResponse != null) {
15 try {
16 httpResponse.close();
17 httpClient.close();
18 } catch (IOException ex) {
19 }
20 }
21 }
From line 2 that is the first breakpoint it gors to line 4 and then goes to line 14. We tried both "Step Into" and "Step Over" and hitting the resume button but stll we get the same result.
We cleaned the project and built it again. Created a new project and wrote the code again. Uninstall/Install the app from the mobile.
How can we fix that problem?