How to configure Android Emulator to use proxy?

When I run “ionic emulate android” the Android emulator pops open but then closes immediately. The console displays the following error message:

FATAL:.//android/base/sockets/SocketWaiter.cpp:89:Check failed: isValidFd(fd). fd 1128 max1024

From reading several discussions on this error message, it seems this is becuase I am sitting behind a proxy, and so I need to configure the emulator to use the proxy.

Has anyone else experienced this problem, and if so, has anyone been able to resolve it?

Many thanks . . .

Unfortunately, this is a bug in Android Emulator.
There is one possible workaround that I know of.
Edit the file: {your_project_folder}/platforms/android/cordova/lib/emulator.js and in method:
module.exports.start, where there is line of code:

var args = [’-avd’, emulator_ID];

Change that line to:

var args = [’-avd’, emulator_ID, ‘-no-audio’];