Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Emulator broken when rotating display

I am facing an issue with the Android emulator. When the emulator boots up everything is fine, regardless the default display orientation. When I press one of the buttons to change the display orientation, the emulator window rotates but, the content is completely messed up. See the pic below. The same happens with all the AVDs I have created and with different android images. I've already reinstalled/updated the emulator from package manager. Any idea about why this is happening?

The work environment is:

  • Mac OS Big Sur,
  • Android Studio v4.1.1
  • Android emulator v30.2.6

Thank you for your help.

enter image description here

like image 816
crowde Avatar asked Dec 07 '20 17:12

crowde


2 Answers

This was a bug in the Google Android Emulator version 30.2.x.

It was fixed in version 30.3.5 (approximately 8 January 2021). Apply the update like this:

  • Stop or Force Quit all the running AVD emulators
  • Android Studio ➔ Tools ➔ SDK Manager ➔ SDK Tools (click this tab in the middle of the dialog) ➔ Android Emulator
  • The status should say "Update Available"
  • Click the Checkbox so that it will change from a horizontal line to a checkmark, and so that the download symbol appears on the left.

Preferences Window for: Android Studio ➔ Tools ➔ SDK Manager ➔ SDK Tools

  • Click the Apply or OK button
  • It should download version 30.3.5 or higher, for "Android Emulator".
  • After the upgrade is applied, relaunch your emulators.
like image 61
Mr-IDE Avatar answered Oct 21 '22 06:10

Mr-IDE


Try running the emulator inside Android Studio. Go to settings-tools-emulator and check the box there to run the emulator inside Android Studio. When you rotate it after it should rotate faster than in the AVD's standalone application, and not break the display. This should fix the broken display problem, without making a new AVD. Make sure you have updated to the most recent version of Android Studio first, v4.1.

like image 26
Caleb Brown Avatar answered Oct 21 '22 04:10

Caleb Brown