Continuando a dúvida que o Victor Maia Sarrasqueiro começou, também tive o mesmo problema(java.net.SocketTimeoutException), porém depois de colocar o IP tanto do celular como do notebook como estático e em seguida colocar no celular o mesmo endereço IP do notebook eu recebo outro exception:
Obs.: Estou usando o projeto disponível para download no final do curso, com a única alteração de colocar meu IP na "baseURL" do retrofit.
Primeiro erro: java.net.SocketTimeoutException:
08-20 11:32:19.489 5133-5430/br.com.alura.agenda D/OkHttp: --> POST http://192.168.1.3:8080/api/aluno http/1.1
08-20 11:32:19.489 5133-5430/br.com.alura.agenda D/OkHttp: Content-Type: application/json; charset=UTF-8
08-20 11:32:19.489 5133-5430/br.com.alura.agenda D/OkHttp: Content-Length: 182
08-20 11:32:19.509 5133-5430/br.com.alura.agenda D/OkHttp: {"caminhoFoto":null,"endereco":"Motorola Enterprise","id":"572995a0-f6cc-4e9b-ba43-f8b91c01f467","nome":"Mr. Moto G3","nota":10.0,"site":"www.motorola.com.br","telefone":"1050 1050"}
08-20 11:32:19.509 5133-5430/br.com.alura.agenda D/OkHttp: --> END POST (182-byte body)
08-20 11:32:19.617 5133-5433/br.com.alura.agenda D/OkHttp: --> GET http://192.168.1.3:8080/api/aluno http/1.1
08-20 11:32:19.617 5133-5433/br.com.alura.agenda D/OkHttp: --> END GET
08-20 11:32:19.621 5133-5133/br.com.alura.agenda I/id do aluno: 572995a0-f6cc-4e9b-ba43-f8b91c01f467
08-20 11:32:19.668 5133-5283/br.com.alura.agenda V/RenderScript: 0xb9919180 Launching thread(s), CPUs 4
08-20 11:32:19.856 5133-5283/br.com.alura.agenda E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb986a398
08-20 11:32:19.856 5133-5283/br.com.alura.agenda D/OpenGLRenderer: endAllActiveAnimators on 0xb98e3258 (RippleDrawable) with handle 0xb9879a90
08-20 11:32:25.724 5133-5281/br.com.alura.agenda D/OkHttp: <-- HTTP FAILED: java.net.SocketTimeoutException: failed to connect to /192.168.1.3 (port 8080) after 10000ms
08-20 11:32:25.725 5133-5133/br.com.alura.agenda E/onFailure chamado: failed to connect to /192.168.1.3 (port 8080) after 10000ms
08-20 11:32:29.513 5133-5430/br.com.alura.agenda D/OkHttp: <-- HTTP FAILED: java.net.SocketTimeoutException: failed to connect to /192.168.1.3 (port 8080) after 10000ms
08-20 11:32:29.514 5133-5133/br.com.alura.agenda E/onFailure: requisicao falhou
08-20 11:32:29.629 5133-5433/br.com.alura.agenda D/OkHttp: <-- HTTP FAILED: java.net.SocketTimeoutException: failed to connect to /192.168.1.3 (port 8080) after 10000ms
08-20 11:32:29.630 5133-5133/br.com.alura.agenda E/onFailure chamado: failed to connect to /192.168.1.3 (port 8080) after 10000ms
Segundo erro: java.io.IOException:
D/OkHttp: --> POST http://192.168.1.3:8080/api/aluno http/1.1
08-20 11:44:38.459 26946-28071/br.com.alura.agenda D/OkHttp: Content-Type: application/json; charset=UTF-8
08-20 11:44:38.460 26946-28071/br.com.alura.agenda D/OkHttp: Content-Length: 182
08-20 11:44:38.460 26946-28071/br.com.alura.agenda D/OkHttp: {"caminhoFoto":null,"endereco":"Motorola Enterprise","id":"572995a0-f6cc-4e9b-ba43-f8b91c01f467","nome":"Mr. Moto G3","nota":10.0,"site":"www.motorola.com.br","telefone":"1050 1050"}
08-20 11:44:38.461 26946-28071/br.com.alura.agenda D/OkHttp: --> END POST (182-byte body)
08-20 11:44:38.521 26946-28071/br.com.alura.agenda D/OkHttp: <-- HTTP FAILED: java.io.IOException: unexpected end of stream on okhttp3.Address@8ffc8b95
08-20 11:44:38.541 26946-26946/br.com.alura.agenda E/onFailure: requisicao falhou
08-20 11:44:38.610 26946-28078/br.com.alura.agenda D/OkHttp: --> GET http://192.168.1.3:8080/api/aluno http/1.1
08-20 11:44:38.611 26946-28078/br.com.alura.agenda D/OkHttp: --> END GET
08-20 11:44:38.616 26946-26946/br.com.alura.agenda I/id do aluno: 572995a0-f6cc-4e9b-ba43-f8b91c01f467
08-20 11:44:38.622 26946-28078/br.com.alura.agenda D/OkHttp: <-- HTTP FAILED: java.io.IOException: unexpected end of stream on okhttp3.Address@8ffc8b95
08-20 11:44:38.710 26946-27266/br.com.alura.agenda V/RenderScript: 0xb990e710 Launching thread(s), CPUs 4
08-20 11:44:38.767 26946-26946/br.com.alura.agenda E/onFailure chamado: unexpected end of stream on okhttp3.Address@8ffc8b95
08-20 11:44:38.875 26946-27266/br.com.alura.agenda E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb9949420
08-20 11:44:38.875 26946-27266/br.com.alura.agenda D/OpenGLRenderer: endAllActiveAnimators on 0xb9926e68 (RippleDrawable) with handle 0xb9681b18