The Android emulator for the current stable version of Android Studio (“Arctic Fox” 2020.3.1 Patch 3, built on September 30, 2021) has a bug that could be a problem if you write articles or document apps: When you press the “screenshot” button (the one with the camera icon), it quietly crashes. The application shuts down without an error message, and it doesn’t save a screenshot.
I rely on the emulator’s “take a screenshot” feature in my developer advocate job, so this was a big problem for me. Luckily, I found a fix.
This bug will eventually get fixed, but until that time, the workaround is to update the emulator to the version in the “Canary” build, Android Studio’s leading-edge preview. You don’t have to download the Canary build for all of Android Studio — just the emulator. I’ll show you how to do it in the following steps.
Step 1: Temporarily change Android Studio’s update channel to “Canary”.
Open Android’s Preferences window, expand the Appearance & Behavior menu, and then its System Settings sub-menu, then select the Updates item.
In the Automatically check updates for menu, select Canary Channel, then click the Apply button.
Android Studio is now set up to get its updates from the Canary Channel, which is where the pre-beta versions of upcoming versions live.
Step 2. Download the Canary Channel version of the emulator.
Select Android SDK from the left menu, then click the SDK Tools tap in the right pane.
Check the Android Emulator checkbox in the list of SDK tools, and then click the Apply button.
You’ll be presented with this dialog box:
Click OK and let Android Studio do its thing:
When the process is complete, you’ll see that you have the 31.1.3 version of the emulator:
At this point, you’ll have a version of the Android emulator that doesn’t crash when you take a screenshot.
Step 3: Change Android Studio’s update channel back to “Stable”.
You can stay on the Canary channel if you like living on the bleeding edge, but most of us are better off with Android Studio getting its updates from the Stable channel.
Go back to the Updates screen, select Stable Channel, and click the Apply button and then the OK button.