Before changing the emulator, check which download failed. SDK packages are fetched by SDK tooling on the development machine. An app running inside a virtual device is a different client.

The command-line sdkmanager reference provides these proxy options:

sdkmanager --list --proxy=http --proxy_host=proxy.example --proxy_port=8080

For the HTTP mode shown, select a permitted public candidate from the HTTP proxy list and enter its host separately from its port. Do not put a full PAC URL into the host field or repeat :8080 inside the hostname. The reference documents http and socks as proxy types; use the option supported by your installed tool and service.

This example lists available SDK packages. It does not install anything or configure every Android tool.

Old answers editing androidtool.cfg or launching the removed android sdk command apply to older SDK Manager implementations. Use the documentation for the executable you actually invoke.

If Android Studio downloads work but command-line downloads fail, compare those two clients' proxy and authentication configurations. If SDK downloads work but a Gradle dependency fails, investigate Gradle's request separately. A working setting in one screen is not evidence that the other process inherited it.

Artiglyn mynjee