need to run emulator with proxy settings , I am using the following command in command prompt to start emulator
emulator -avd AVD_for_3_7_WVGA_Nexus_One -http-p
For some reason Android Emulator doesn't like IP address as the proxy. If you are using Fiddler use localhost:8888
:
emulator.exe -avd Nexus_5_API_21_x86 -no-audio -http-proxy localhost:8888
Don't forget -no-audio
parameter too.
This problem is really frustrating. It would be nice if fixed targeting real root because most of the configurations are behind proxy now-a-days.
I observed while researching on this problem for last couple of weeks that emulator is not stable when it comes to http-proxy.
I installed android-studio-bundle-141.2422023-windows on one of the other m/c on that although proxy settings worked nice for http sites but failed for https sites.
On my m/c it didn't work. I tried with all the options listed online like -no-audio or setting from APN(emulator setting), or various versions of using -http-proxy. But none is working for me.
This is still a bug in android emulator refer link - https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=102361
Problem was fixed on latest Android SDK Tools (at the time of writing is in preview). You need version 25+ in order to get the new emulator which doesn't have this problem anymore.
I'm experiencing the exact same issue.
Luckily there is a workaround and I can say it's working (at least in my case): adding the -no-audio
parameter to the command:
emulator -avd <device_name> -no-audio -http-proxy http://<username:password@>IP:Port
edit: even if it's working for you, please star the bug to get it fixed!
All solutions above was unable to fix my case. For me proxy settings was required, so disabling a proxy parameter does not fit to me. The only solution that helps me is to disable "Use Host GPU" option in the emulator options. Adding "-no-audio" parameter is also required.
And it works! Slowly, but works.
Adding "-http-proxy none" (without quotes) in Run configuration also fixes this issue as shown in image attached. Please note this is one way of fixing this issue. Your app may not be able to connect to internet via proxy later on.