Bom dia Pessoal:
Estou rodando a aplicação direto no aparelho (LG) e fiz a alteração da string endereco conforme apresentado. Mas ao salvar o registro ocorre o seguinte erro:
06-08 08:16:10.586 20290-20870/williamcampana.agenda W/System.err: java.net.SocketTimeoutException: failed to connect to /192.168.4.107 (port 8080) after 90000ms
06-08 08:16:10.600 20290-20870/williamcampana.agenda W/System.err: at libcore.io.IoBridge.connectErrno(IoBridge.java:223)
06-08 08:16:10.600 20290-20870/williamcampana.agenda W/System.err: at libcore.io.IoBridge.connect(IoBridge.java:127)
06-08 08:16:10.600 20290-20870/williamcampana.agenda W/System.err: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
06-08 08:16:10.601 20290-20870/williamcampana.agenda W/System.err: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:475)
06-08 08:16:10.601 20290-20870/williamcampana.agenda W/System.err: at java.net.Socket.connect(Socket.java:861)
06-08 08:16:10.602 20290-20870/williamcampana.agenda W/System.err: at com.android.okhttp.internal.Platform.connectSocket(Platform.java:152)
06-08 08:16:10.602 20290-20870/williamcampana.agenda W/System.err: at com.android.okhttp.Connection.connect(Connection.java:101)
06-08 08:16:10.603 20290-20870/williamcampana.agenda W/System.err: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294)
06-08 08:16:10.604 20290-20870/williamcampana.agenda W/System.err: at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
06-08 08:16:10.604 20290-20870/williamcampana.agenda W/System.err: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
06-08 08:16:10.605 20290-20870/williamcampana.agenda W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
06-08 08:16:10.606 20290-20870/williamcampana.agenda W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)
06-08 08:16:10.606 20290-20870/williamcampana.agenda W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
06-08 08:16:10.607 20290-20870/williamcampana.agenda W/System.err: at br.com.alura.agenda.WebClient.realizarRequisicao(WebClient.java:32)
06-08 08:16:10.608 20290-20870/williamcampana.agenda W/System.err: at br.com.alura.agenda.WebClient.insere(WebClient.java:50)
06-08 08:16:10.608 20290-20870/williamcampana.agenda W/System.err: at br.com.alura.agenda.inserirAlunoTask.doInBackground(inserirAlunoTask.java:24)
06-08 08:16:10.609 20290-20870/williamcampana.agenda W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-08 08:16:10.610 20290-20870/williamcampana.agenda W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-08 08:16:10.610 20290-20870/williamcampana.agenda W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-08 08:16:10.611 20290-20870/williamcampana.agenda W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-08 08:16:10.612 20290-20870/williamcampana.agenda W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-08 08:16:10.613 20290-20870/williamcampana.agenda W/System.err: at java.lang.Thread.run(Thread.java:848)
06-08 08:16:10.635 20290-20872/williamcampana.agenda I/System.out: [socket][1] connection /192.168.4.107:8080;LocalPort=49664(0)
06-08 08:16:10.636 20290-20872/williamcampana.agenda I/System.out: [CDS]connect[/192.168.4.107:8080] tm:90
Sei que não está conseguindo fazer a conexão. Como poderia resolver isso?
Grato ...