Reputation: 3348
I need to configure the proxy manually in my emulator through Android Studio. From the official Android documentation, it is suggested that this change can be made in the "settings" tab of the emulator's extended controls. The problem is that it seems to me that this documentation is outdated, as this setting is no longer displayed in the "settings" tab of the Android Studio emulators' extended controls.
Android Studio Bumblebee | 2021.1.1
Build #AI-211.7628.21.2111.8092744, built on January 19, 2022
Runtime version: 11.0.11+9-b60-7590822 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: com.wakatime.intellij.plugin (13.1.10), wu.seal.tool.jsontokotlin (3.7.2), org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40), com.developerphil.adbidea (1.6.4), org.jetbrains.compose.desktop.ide (1.0.0), ru.adelf.idea.dotenv (2021.2), org.intellij.plugins.markdown (211.7142.37)
Upvotes: 53
Views: 27830
Reputation: 714
You can add the proxy in the emulator wifi settings. Click on internet settings, select androidWifi. Click on the edit icon then add your proxy there.
Upvotes: 2
Reputation: 1683
You can go to setup proxy in Android Studio itself.
The downside of the solution is that the proxy is also applied to Android Studio itself. So traffic from Android Studio goes through the proxy.
Upvotes: 12
Reputation: 3348
After a while trying to find solutions to this problem, I saw that an emulator running outside android studio provides these options. To run a standalone Android Studio emulator see the official documentation or simply enter the command:
emulator -avd <avd_name>
In my case I'm using an avd named PIXEL 4 API 30
, so the command will be emulator -avd PIXEL_4_API_30
. If you are on Windows you may have problems running this command so I suggest you see this.
The solution proposed by @Inliner also solves this problem.
Upvotes: 5
Reputation: 1659
You can open old emulator version by unchecking setting here
If you struggle to close your old emulator, try killing qemu... process
Upvotes: 56