Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Pixel 5 emulator in Android Studio

I have a flutter app that builds and runs fine on Pixel 4a, but apparently fails to start on Pixel 5. I want to test this on a Pixel 5 emulator, but I can't find how to add it to Android Studio anywhere.

I downloaded the preview release of Android Studio and followed the other steps in the link in the answer to this question, but there is no Pixel 5 there.

Any ideas?

like image 765
Daniel Porteous Avatar asked Jan 27 '21 04:01

Daniel Porteous


People also ask

Does Android Studio have built in emulator?

The Android Emulator runs directly inside Android Studio by default. This allows you to conserve screen real estate, navigate quickly between the emulator and the editor window using hotkeys, and organize your IDE and emulator workflow in a single application window.


2 Answers

I just created a profile. In Android Studio:

  • Open AVD manager
  • Click New Hardware Profile
  • Enter suitable device name e.g. "Pixel 5 API 30"
  • Screen size is 6.0", Resolution is 1080 x 2340
  • In the Default Skin dropdown, try Pixel 4 XL (this adds the black surround to the AVD. Note that if you use "No skin", it doesn't add the surround shape to the resulting AVD, but you get a useful heading at the top showing its name)
  • I accepted the rest of the defaults
  • Click Finish
  • Click Next to get to System Image dialog
  • Select suitable image e.g. R - API 30
  • Click Next
  • Click Finish
like image 129
user3012629 Avatar answered Oct 09 '22 18:10

user3012629


It appears that there is no great option to get a Pixel 5 emulator. Google's document, titled Set up Android Emulator to run Android 11 does not mention the Pixel 5, and the emulator has not been updated since the release of the Pixel 5.

You may be able to access one through a service like Corellium, or, create a custom hardware profile in Android Studio.

like image 36
aidenmitchell Avatar answered Oct 09 '22 18:10

aidenmitchell