I rarely use Android Emulator, but this time I need it to emulate devices with two screens/displays.
I set it up from "Extended Controls" --> "Displays" menu and add the "Secondary Display" then click "Apply Changes".
However, this is what I got:
Although there appears the second panel I circled as "2", the secondary display is nowhere to be seen...
I have tried:
Deleting the avd file in "[path]/.android/avd",
Doing "Cold Boot" and "Wipe Data", also tried
Creating emulators with different APIs (29 [x86 - Google Play], 30 [x86 - Google API], 33 [x86_64 - Google API & Google Play]).
I have checked the HAXM Installer too:
The results are the same as above.
What should I do to fix it? Are there any steps I missed?
I'm also open to suggestions for other emulators that can emulate secondary display.
Thank you in advance.
Related
Is there a way to give an emulator a name in Android Studio?
In the emulator pull-down box in Android Studio, the emulators created from AVD manager are labelled simply: "Android SDK built for x86 (mobile)(emulator-nnnn)", where n is an integer.
If you're running multiple emulators, this isn't very helpful. Is there a way to rename each emulator to something more helpful? For example, when I created each emulator, they have names of e.g. "Pixel 4 API 29", and "Nexus 5 API 24" - why aren't these used?
Update: Two screenshots show what I mean. In the top one, the "Nexus 5 API" has been selected; yet it shows as "Android SDK etc". If I select e.g. "Pixel 4 etc", it shows as exactly the same (it actually has an emulator number added that only shows when you open the pull-down).
Of course you can edit the name of your AVD.
In the AVD Manager, clic on the pen to the right to edit your configuration and then, you can rename your AVD
Edit: There names are correctly shown in the pull-down menu, even if launched
Well what #Bruno said is the easiest way, if it does not work that way you can either try this one, is a little bit tricky though.
In case you use Mac that's an example of how to do it, if you do not use Mac let me know and I'll put the steps to do it on Windows / Linux
Open in Finder
user.name/.android/avd/
Pd: To be able to show the hidden files press ⌘ + ⇧ + .
Find your emulator, in my case I'll show this one :
Open the Pixel_4_API_30_-_Android_11.avd folder (in your case will be different) and open config.ini file and change these two params (AvdId,avd.ini.displayname)
And now restart your IDE and it should be updated.
I'm sure you could change more names, but to ensure the functionality of the emulator, I wouldn't touch too much if you do not know what you are changing.
Let me know if it works :)
You can not change the device name "emulator-nnnn" from Android Studio as that name belongs to the device. This is the name that you see in "adb devices" output.
For a real device, you have to change its name by opening the Settings app from the device.
For an emulator, in theory you can do the same, you open the Settings app inside the emulator when emulator is running. But I haven't tested this because my emulator is very slow.
I am attempting to test an app on an ice cream sandwich device. To achieve this, I was hoping to run an emulator in android studio running API Level 15.
I have made sure to install the system image through the sdk manager and it correctly displays as installed in the manager as seen below:
Unfortunately, when I try to select the system image from the list in the Virtual Device Configuration menu, the option is not shown.
I've tried to look this up online, but the solutions seem rather unorthodox. Has anyone had this issue and found a solution for it?
I think this is a bug. Here is a workaround. After downloading API Level 15 Intel x86 Atom System Image, do the following.
Go to Standalone SDK Manager.
Select menu item Tools-> Manage AVDs...
Click "Create..." button.
Select "Android 4.0.3 - API Level 15" as Target.
Fill in other fields as appropriate, and click OK.
Now, you can go back to regular AVD Manager and start the AVD with API Level 15 image you just created. When you try to edit configuration, you may see error message "The specified SD image file must be a valid image file". If you do, just click Show Advanced Settings and go to "Memory and Storage section", find "SD card", and select "Studio-managed". Somehow, this selection won't stay, and you have to do this every time you modify configuration.
Android 4 ICS is supposed to have virtual menu, home and back buttons at the bottom. I don't see this in the emulator. Do I have to do something to enable that?
today Google solve this problem, you need to update the emulator to the rev16 version and Android ics system image 2.
Xavier Ducrohet post this on Google+ today.
Try to set the AVD resolution to WXGA720. Read about it somewhere and it and now the AVD shows the nav buttons.
I would like to convert/adapt my application to Android 4.0.
To do so I plan to use the ActionBar on devices that support it.
All Android version >= 3.0 do so. Furthermore devices that do not have a hardware menu button seem to show an "menu" button on the actionbar automatically.
When I test my application on the emulator using API level 13 this does work as expected...
... but somehow I'm not able to setup the emulator to behave the same way while emulating a phone on API level 14 (Android 4.0).
When I try to set "Hardware Back/Home keys" to false there are no buttons at all (not on the screen and not keypad provided by the emulator).
I have seen on some screenshots and videos from the "Galaxy Nexus" that it is showing an "menu" button on the ActionBar as well ... like Honeycomb tablets do it, but I'm somehow not successful to do the same with the emulator which makes it a bit more complicated to understand how my UI will work on Andoid 4.0 phones.
EDIT:
Here is an image that is showing the On-Screen back and home buttons I would like to see in the emulator:
It seems the issue was fixed with the latest update of the SDK (R16).
Just update your SDK and ADT to R16 and create a new emulator using the updated Android 4.0 system image.
The soft keys showed up for me when I set hw.mainKeys to no:
Open $HOME/.android/avd/YOURS.avd/config.ini
Set hw.mainKeys=no
(This was covered in a deleted answer; don't know why it was deleted.)
When you create new emulator there is grid Hardware, and there you can add options Hardware home and back buttons and Hardware keyboard. So, create new emulator and look at your "Galaxy Nexus" :)
Unfortunately you can't change this properties for existing emulator.
After upgrading to R16 I could only get the on-screen buttons to appear if I created an emulator using the WXGA720 resolution.
Here is my complete config.ini file:
hw.sdCard=yes
hw.mainKeys=no
hw.lcd.density=320
disk.cachePartition.size=256MB
hw.cpu.arch=arm
skin.name=WXGA720
sdcard.size=512M
abi.type=armeabi-v7a
image.sysdir.2=system-images\android-16\armeabi-v7a\
image.sysdir.1=add-ons\addon-google_apis-google-16\images\armeabi-v7a\
hw.gps=yes
skin.path=platforms\android-16\skins\WXGA720
hw.keyboard.lid=no
hw.cpu.model=cortex-a8
vm.heapSize=48
hw.ramSize=1024
Hopefully this helps someone.
If your application includes functionality that would respond to a menu button, the menu button will be added to the black bottom bar.
If you are having trouble seeing this in the emulator, you can do a bit of a workaround by setting it to a tablet resolution (I use 1280x800) and observing your menu button behavior there, as it should be the same as on the phone version.
I'm newbie in Android application development. I just downloaded all SDks and Eclispe. Then I created sample project with the help of some online tutorials. On running the project for the first time it asked me to set virtual emulator and I then set some arbitrary values for layout (I guess 700), now when I run the project every time the emulator size is so big that it doesn't fit im my computer screen.
How can I change the settings for emulator? also my emulator gets hanged and says not responding, any suggestion will be appreciate.
Apologies if the question is silly, I'm just trying out my hands at Android.
It sounds like you are starting an API level 11 or 12 emulator. This can be very slow to start. To fix the display size start the emulator from the SDK manager icon and select the option 'scale display to real size'
Pramodtech... on Eclipse you can set the scaling factor from 0.1 to 3.
Go to Run --> Run Configurations...
--> Target tab
--> Scroll until you see Additional Emulator Command Line Options
--> enter -scale <0.1 to 3>
--> Apply
If you want to change the screen size:
Go to Window --> Android AVD Manager
--> Virtual Devices Select AVD
--> Select Edit
--> Select Skin: Built-in HVGA (for 160)
--> Edit AVD to save.
You can close your emulator, open the Android AVD manager (by clicking its icon in the Eclipse toolbar), and then edit your AVD's resolution.
-A
P.S. AVD = Android virtual device