Error Unable to resolve host when run ionic application in Android studio emulator - Stack Overflow

admin2025-04-18  2

I'm working on mobile application (angular ionic capacitor). Our test-server with api is reachable only when you are connected to VPN.

When I run application on real android device (vpn is ON) everything works fine. But when I try to send any request from application running in Android Studio Emulator (VPN on laptop is also ON) I get error: Unable to resolve host "our-host-name".

Is there any way to setup Emulator or smth else to let people test application in Emulator?

Thanks.

I noticed also that our-host-name is not reachable even if I send some simple GET from Chrome in Emulator. But if I put ip-address instead of hostname - it works.

BTW: requests are on http protocols for testing (not https).

转载请注明原文地址:http://anycun.com/QandA/1744918781a89473.html