I have to emulate an HTC One, so I set a Device like this:
But, when I start the AVD, the AVD goes black, and doesn't boot.
How can I fix this?
That's because your monitor doesn't have that many pixel per inch. To start it when you launch the emulator select scale display to real size ,click on the question mark and select the monitor's screen size in inch and resolution, it will then automatically calculate monitor dpi. Also edit emulator to make use of host GPU as others have suggested. If your GPU is weak the screen of the emulator may blink and it will be even slower than normal emulators.
Related
I have defined some custom devices with rather unusual screen sizes and resolutions (I use the term screen size for the length of the display diagonal, and the term screen resolution for the number of pixels).
I hoped that the auto scale device parameter will show the emulator screen in the size as defined in the custom device settings. It does not.
I am aware of window scale command and have calculated the specific scale factor based on the MacBook Pro retina density of 220ppi and my custom device screen density, but still get the wrong size.
I could use a physical ruler and resize the emulator window till the screen size is correct, but reject to believe that there is no better way.
Here is what I would expect to be possible with the AVD too.
Anybody had to deal with this before and know how to instruct the emulator to resize the window so that the screen size is as defined for the custom device?
UPDATE:
As described at the end of this article: "When you launch an AVD from the AVD Manager, you can specify the screen size for the emulator and your monitor dpi in the Launch Options, as shown in figure 7."
The problem is that it seems to be broken, as it only takes care of the device screen resolution and the display density.
Why some devices are for example 2.7 inches and when you launch the emulator the real size is not 2.7 inches..?
Edit:
And will the display on that screen be like the real display or will it differ on real devices?
You can start the emulator to have the same number of pixels or to have the same size as the real device. You cannot have both since the density of your screen in general differs from the density of the device.
If you specify to have the same size and the actual size still differs, then your OS did not correctly recognize the density of your screen.
The density of the screen on the development machine is normally lower than the one of the device. A pixel perfect emulation of the device screen will therefore only be achieved when you choose the same pixel size. But then, the emulation is very good since the emulator runs the same code and operating system as the real device.
This you can set while launching the emulator. You will get an option of scaling display to real size but that will appear very small on your computer screen. So better use the default size which fits to the screen.
I am trying to lunch my Android application on an emulator. The point is i want to make the emulator in the size of the real device. Although I used -scale 0.8, it's still much bigger than real size
The dimensions that you set in the emulator are in inches, which match into the corresponding real device resolution and if you select to, dimensions on your resulting monitor image.
But consider that your monitor may translate that..
If you really wish to have the same dimensions in the resulting image on screen compared to the device in your hands, why not adapt the dimensions yourself until you're happy with the result? In eclipse: Window -> Android Virtual Device Manager -> Device Definitions -> New Device
Create the device with the dimensions it should have (you may look in gsmarena) then run the emulator on real size making sure your monitor/video card is not scaling (extended desktop with multiple monitors). If not just tune the dimensions when creating the virtual device until you get what you want
I created custom device with configuration- screen size 5.3 inch and 900x1480 resolution.
Then i created AVD with different OS versions, but emulator never launches. It shows up emulator screen but all the time there is only black screen, not even showing "Android". In DDMS LogCat there are going on some actions but for me it looked like its one big loop repeating.
Also i tried to emulate HTC One (normal-xxhdpi) but there is same problem. In this case it may be there isnt updates made to support xxhdpi.
that happen to me if i set more than 786MB in RAM you should use 512 MB and the emulator will launch
Try selecting "Use Host GPU" in the virtual device settings.
I was wondering, I now have an app that makes a grid of 16x16 buttons which are all 30dp wide. That makes a total of 480dp. In the emulator it runs fine (which runs at WVGA). Can I change the screen size of the emulator in any way to test if my app runs fine on lower and higher screen resolutions?
You can define different AVDs using the AVD manager. When you launch the AVD, you can specify a virtual-to-screen scaling, which will also affect the density that the emulator will use.
Yes, of course. You can do that in the AVD manager. Start your virtual device from AVD and a little dialog will pop-up asking you if you would like to set a custom size for the device. Alternatively you can create additional avd entries.