Android Emulator window not displaying properly - android

I am very new to android development. I have issues in Android AVD device display. It display the content very big. Here I cannot attach screenshot.
The lock screen looks like the very big font for Time and Date which
beyond the screen size.
Even I cannot see the lock icon to go to Home screen.
Device Definition:
Device : Nexus One(3.7", 480 x 800:hdpi)
Target : Android 5.1.1 - API Level 22,
CPU / ABI : ARM (armeabi - v7a),
SKIN : WVGA800,
RAM : 512 ,
VM Heap: 32 ,
Internal : 1024
I already searched for fix and deleted device and recreated the device, but same problem. But I cannot find the solution.
Thanks a lot.

Create a AVD having below configuration.
It is very fast for testing application.
See the image below.

I found that Device and Skin selection is somewhat an issue with newer Android SDK(not in 24.2.0 and lower, tested 24.4.1, 25.2.5 and has this issue). When I choose any named Device like Nexus *, then I have to choose only skin Skin with dynamic hardware controls and if I choose unnamed Device(with only size and resolution mentioned) then I can choose any of the Skin in the list.
Screenshot of how the problem is looking is at https://android.stackexchange.com/questions/96949/android-avd-not-displaying-appropriate-scale

if you match your laptop/computer resolution to your external monitor's resolution. Then you can return back to your PC's resolution.
On you laptop/Computer From Settings -> Display settings -> Decrease the screen layout (125%) or decrease the scale and layout of your screen and restart emulator.
This is how to change display settings
before result
Before changing the display settings
after result
After changing the display settings
P.S.It's temporary solution.

Related

Android emulator screen fills up only some fraction part of actual android emulator screen

First thing first,
Using Android Studio 2.3.3
Problem:
My emulator screen is covering the only partial amount of screen available for emulator, i.e top left of the emulator and rest part is just a black screen.
See the pic I have attached.
Things I tried:
1) Restarting emulator
2) trying different emulator
3) changing pixels, density of emulator device,
4) run -> edit configuration ..blah blah blah...
Nothing helped!!
Note:
My issue is not emulator's size but effective screen size.
please help if somebody could have come across this issue :(
IMPORTANT EDIT: I guess, this issue has something to do with the laptop I am using, DELL Latitude, touch screen (14-inch QHD touch display (2,560×1,440 resolution).
Because the same emulator works properly in other display laptops.
*Software rendering is very slow to be usable
Better Fix
You can fix the scaling issue when using the Hardware rendering by simply making windows override the scaling setting. How?, it's very easy.
Simply locate the .exe file for the emulator that you are using, (e.g. "qemu-system-armel.exe" for ARM and "qemu-system-x86_64.exe" for x86).
To make sure which .exe file, just run the emulator then use task manager to locate the .exe file is running, see the screenshot.
locate the .exe file using task manager
In my case it was in this location:
"C:\Users[Username]\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe"
Now just right click on the file then click on properties then choose the "Compatibility" tab. Under "Settings" at the bottom, click on "Change high DPI settings".
A new window will open. Tick the last checkbox "Override high DPI scaling behavior." under "High DPI scaling override".
Then select from the drop down below it "System" (this is very important or it will not make any difference!), see the screenshot below. Now just hit OK and OK. And that's it, problem solved :)
I was having the same problem too. I think it started happening when I updated to Android Studio 3.0 Beta 1, but I'm not 100% sure of that.
FIX:
Anyway, to fix this, you can use Software Graphics in the emulator options, rather than Hardware. Slower, but at least it works.
I have this similar issue. It happened after using an external monitor that has lower resolution (1440 x 900) than my laptop (2160 x 1440) has. There are couple of ways you can fix it until Google fix the issue.
if you match your PC's resolution to your external monitor's resolution. Then you can return back to your PC's resolution.
If you lower the scaling of your PC ( mine was 150% > 125% or 100%) from Display Settings. Run the emulator. Again, you can return back to your original scaling, emulator screen won't change. This is the one I prefer.
Note: this is not a permanent solution. You may need to change scaling/resolution again if you change your scaling or resolution to the one you had issue with. I have tested this only on Windows 10 Pro, but this approach might work on Mac as well.
I am running Archlinux and I had exactly the same problem because I have $QT_SCALE_FACTOR set to 2 by default. Setting it back to 1 for the emulator fixed the problem:
env QT_SCALE_FACTOR=1 Android/Sdk/emulator/emulator -avd api25
Open the Emulator and press Ctrl+Up_Key to increase the scale and Ctrl+Down_Key to scale down. (Cmd+KUp / Cmd+KDown if you are on mac)
Try this and hopefully it works for you -
Go to Tools in Android Studio and open AVD Manager
It will open all your virtual devices. Click on the Virtual device you want to edit and click the Pencil icon which will enable you to edit the device.
Click on Change where it lists the device name. For example, for me my device name is Nexus 5X and lists the resolution of the device.
In the Select a Device screen, click on New Hardware Profile and change the resolution to 1080 x 1920 px.
Save the changes and run it again. If it still doesn't work, change the skin of the device.
If still doesn't work, then make a new hardware profile with a new device.
Have you already tried other emulator? I suggest Try bluestacks
go the tab Emulator (next to the General tab), and in Additional command line options, write
-scale 100.X
Press alt + space + M
Pls. see landscape also and revert back to portrait
This looks like an incompatibility with windows scaling.
Try setting scale to 100% in display settings of Windows (right click on desktop).
In case someone ran into this issue on Linux, here is a fix:
QT_AUTO_SCREEN_SCALE_FACTOR=0 emulator -avd <Name of your virtual device>
I ran into this issue a while ago and have been struggling for it until now.
Solution seems to be:
Go to C:\Users\YourUser\AppData\Local\Android\Sdk\emulator
Here, right click on emulator.exe, click Properties and go to Compatibility. Here, check: "Override high DPI scaling behavior. Scaling performed by: APPLICATION".
This should fix the issue on any Windows 10 machine with display scaling activated.
Just go to display setting and change it to 100%.this normally happens if you have a fourteen inch laptop and below
Best and simplest way to do it on Windows 10:
Close your Android Emulator if it is open
Right-click desktop
Click Display Settings
Set Scale and layout to 100%
Open Android Emulator
Revert your Scale and layout to the (Recommended) percentage

Creating a Wear AVD

I've several comments in my android wear applications which says that my app doesn't look good on two devices:
ZenWatch and Sony SmartWatch3.
I've gathered DPI and resolution of both:
ZenWatch - 320x320 round 278dpi 1.63 inches
SmartWatch3 - 320x320 square 283dpi 1.6 inches.
Now, I'm trying to run the APP further than the basic emulator. However, there are just two configurations I can use:
I've tried editing it's config files, with no luck.
in config files I couldn't manage to find screen size. Just DPI and looks like any configuration changed, is ignored.
The following is all the configuration I've found interesting:
hw.lcd.density=240
No screen size, no resolution. Just lcd density, which for me looks like DPI, but now I'm not sure. So I cannot mimic any of the two above mentioned devices.
Any tips about this?
Edit 6 June 2015:
I cannot run the device I configurated:
As you can see, a yellow warning is shown, which says the following
So I'm not able to run any device I created.
Click Button of AVD Manager, then click Create Virtual Device..., then click New Hardware Profile, then you can in the new window customize settings of a hardware, like Device Name, Device Type, Screen(ScreenSize, Resolution), Memory, Input, Supported Device states, Camera and Sensors.
After finishing these, you can select this Hardware Profile to create your AVD.
If I understood you correctly, you need to click on the "New Hardware Profile" button on the buttom left corner and then you can change the size of the screen, it's resolution and more.
Just for the sake of answering some other users... What I've been actually facing, was that there's a different DPI used in an AsusZenwatch on 4.4W and 5.1.1... Weird but true. Be sure to test on both APIs

How to test Android lock-screen widgets in an emulator?

It doesn't seem to work. I looked at the solution proposed here: Android emulator 4.2.2 not showing add widget option in lock screen but without success. Using the rev1 image (as the rev2 has a bug, filed here: http://code.google.com/p/android/issues/detail?id=58548)
No way that I get that '+' sign... Ideas?
Of course, the project is using Android 17.
Use power button but set some lock screen (swipe for example) in Android settings before.
With the following combination, it's now working for me.
Install: Run Android SDK Manager. In the "Android 2.2.2 (API 17)" section, install Intel x86 Atom System Image. It offers Rev. 1. Also download, install, then finish installing Intel HAXM, if you haven't done that already. You might need to allocate more RAM to HAXM. IIRC, I have it set to 2 GB.
(Android SDK Manager has Rev. 2 of ARM EABI v7a System Image. According to Android emulator 4.2.2 not showing add widget option in lock screen, lock screen widgets work in Rev. 1 but not Rev. 2. I didn't test the ARM system images.)
Create an AVD with these settings:
Device: Galaxy Nexus (4.65", 720 x 1280: xhdpi)
Target: Android 4.2.2 - API Level 17
CPU/ABI: Intel Atom (x86)
Skin: Skin with dynamic hardware controls
Memory options: RAM: 768, VM Heap: 64
Internal Storage: 200 MiB
SD Card: Size: 100 MiB
Emulation Options: [x] Use Host CPU
Add a lock screen widget:
Launch this emulator AVD.
Run your app in this emulator.
If you need to get to the lock screen, press the simulated power button twice (off, on).
On the lock screen, swipe down on the clock widget. It should grow a large rectangle. Release the mouse.
Swipe to the right until you get to the "+" screen.
Tap the "+" then pick your widget from the list.
NOTE: Android L does not support lock screen widgets. The feature is gone.
I hope this works for y'all. There may be more independent variables, and the above configuration is surely not the only one that works.
To reach the lock screen of Android Emulator, in recent emulators (using Android Studio 2.3) just click the "power" button in the Emulator. You'll get a black screen. Click it again and there it is, your lock screen.
Press(rather click :) ) the power button twice on the emulator. This will make it go into lock mode.After that , click on lock button again, the phone lights up with you asking to provide pin/finger print/pattern in case you had put them in your unlocking. Hope this helps..
Yes it does not seem to work with my AVD. But it works with genymotion. Maybe you can try it. Download it from http://www.genymotion.com/.

Android emulator resolution, aliasing, gpu emulation

I just downloaded the Android 4.1 (API 16) packages using the SDK Manager and created an Emulator for JellyBean. What I see now is everything on the JellyBean emulator is aliasing. When I open the screen capture dialog in DDMS, the screen is HUGE - I think the emulator is scaling that down, thus causing the aliasing. Screenshot:
And here are the emulator settings:
I've used these same settings (minus the GPU emulation = yes) before for my ICS emulators, including the built-in screen resolution WXGA720. What settings should I change to get rid of this problem?
Make sure that Scale display to real size is unchecked in the Launch Options dialog (which appears after clicking on Start... in the AVD manager).

Not able to set actual device resolution in Emulator

I am developing an application which I need to test in Samsung I9000 whose resolution is 480*800. But when I try to create a AVD Emulator with 480*800 resolution, I am getting a very big resolution. How to get the screen resolution of Emulator similar to Device.
I will be waiting for valuable reply.
You can let the emulator scale itself to a real display size if you start the emulator manually. Using Eclipse you can achieve this by navigating to Window->Android SDK and AVD Manager then select a device and hit Start... in the popup which appears (Launch Options) you just check the Scale display to real size checkbox and set the screen size in inches and the monitor dpi. If you don't know your monitor dpi hit the question mark ? and another popup will appear helping you to get the correct value. When all values are set just hit Launch and your are good to go.
Go to Window > Android SDK and AVD Manager > New and in the Create New Android Virtual Device in the Skin section you should be able to do it. Is that what you tried? What exactly do you mean when you say you are getting a "very big resolution"?

Categories

Resources