简体   繁体   中英

Android Studio emulator frame size is much bigger then the screen size

I tried to use Android Studio emulator on my Dell XPS 15 with 4K display (set to 200% scaling). There is a problem, however. The size of the emulator screen is fine, but the frame around it is enormous. Here is how it looks like:

在此处输入图片说明

I used Android Studio and it's emulators on this machine before, but it was more then a month ago and since then I reinstalled Windows once.

I tried to change emulated graphics setting like first answer in this question suggests: Android Emulator Screen Size not the same as device frame

But no luck, that dropdown is just grayed out for me, I can't do anything with it. Also, if I disable the frame in emulator settings, window for it is still very large compared to the "screen". What can I do?

I've found a solution to this problem. You should go to where your 'emulator.exe' is located (for me it's C:\\Users***\\AppData\\Local\\Android\\Sdk\\emulator) right-click 'emulator.exe', go to properties, and do the following:

  1. Go to the 'Compatability' tab
  2. Click on "Change high DPI settings"
  3. Check 'Override high DPI scaling behavior" and chose 'System (Enhanced)' from the list. “emulator.exe”示例的属性

Click Apply and then OK. Restart IDE and all should work well! :)

I experienced the same problem with my Windows 10 computer. Here is a solution that works for me:

  1. Start Android Studio
  2. Switch your screen resolution to 1920 x 1080 at 100% scale by going to windows display settings 在此处输入图片说明
  3. Once your screen resolution is at 1920 x 1080, start the android emulator
  4. While the emulator is running, switch your resolution back to 3840 x 2160 at 200% scale and the emulator should look right

You will have to do this every time you start the emulator. Once you have it running properly in 4k DO NOT close the emulator because you will have to repeat the above steps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM