Android Studio AVD screen size and position - android

I have a problem with Android Studio AVD as You can see on the image below:
AVD screenshot
I am using Android Studio 2.3.1 up to date in Fedora Linux.
No matter if I change the resolution, screen size, phone type of the AVD it looks the same as in the image.
How can I fix it?
Thank You!

I'm struggling with similar problem right now. In my case... I've created the AVD from a command line for example avdmanager --verbose create avd --force --name myEmulator--device "4in WVGA (Nexus S)" --package "system-images;android-23;google_apis;x86" --tag "google_apis" --abi "x86" and then if you want to run newly created AVD emulator you should type the command 'emulator -avd myEmulator (and optional arguments)'. Maybe it was an issue with a path to system image.

Related

Android emulator power off button does not work when using avd with system image > android 30

I am using avdmanager to create an avd to run with the latest android emulator on Ubuntu 21.10.
I am using Android emulator version 31.2.8.
When I create and avd with system image 28...
avdmanager create avd -n pixel_5 -k "system-images;android-28;google_apis_playstore;x86_64" --device "pixel_5"
and run it..
emulator -avd pixel_5
I can then subsequently hold the power button, and the android OS on the emulator properly powers off.
When I create and avd with system image 30 or 31...
avdmanager create avd -n pixel_5 -k "system-images;android-31;google_apis_playstore;x86_64" --device "pixel_5"
Once the emulator starts, the power button does absolutely nothing, if I click on long click.
It's because a bad person at Google decided that the power button should trigger the Google Assistant. You can un-break it in Settings->System->Gestures->Power menu->Hold for Assistant
Find your avd path(default~/.android/avd)
Find the AVD name (your is pixel_5)
Open the folder and find config.ini
Edit hw.keyboard = yes

emulator -avd does not launch the device

on Ubuntu 16.04 I have installed AndroidStudio and via its AVD manager GUI did create tow new devices. now on Terminal when I type emulator -list-avds it lists the devices correctly, but when run emulator -avd <name> I face errors:
[139684796983104]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '/home/amir/../emulator/qemu/linux-x86_64/qemu-system-i386': No such file or directory
How should I solve it?
both in Windows 10 and Ubuntu I was facing the same problem. the simple solution is that I had to go to the directory of tools then execute the command. for instance in windows.
$ cd C:\Users\user-name\AppData\Local\Android\sdk\tools
emulator -avd <deviceName>
also it is good to mention I wanted that for React-Native development, and Expo XDE saved me

Creating an AVD and linking it to the AOSP

I am trying to use this tool GemDroid https://github.com/huz123/GemDroid_QEMU. I have downloaded the AOSP android-4.4.4_r2 and built it as well. According to the link above, an AVD has to be created using Android Studio, which I did but it give selective options to download a system image, say an Android 4.4.
My first question is how can I link the AVD to the AOSP I have
downloaded? I tried pointing the location of the SDK to the AOSP
location from Files>ProjectStructure in Android Studio but it says
"SDK does not contain any platforms".
Is there a different way whereI can create an AVD directly from the
directory of AOSP?
Or according to the step "start the emulator with
your android virtual device as usual" in the link above, how can I
start the emulator from AOSP with an AVD created using Android
Studio?
I am using Ubuntu 14.04. Please help, thanks!
You don't need the Android Studio for that - just go to your root directory and type in the command line:
emulator
If this doesn't work you probably had a problem in your build.(Build the AOSP)
This is how I run the build
source ./build/envsetup.sh
lunch aosp_shamu-userdebug
./prebuilts/android-emulator/linux-x86_64/emulator
-sysdir out/target/product/shamu/
-system out/target/product/shamu/system.img
-ramdisk out/target/product/shamu/ramdisk.img
-data out/target/product/shamu/userdata.img
-kernel prebuilts/qemu-kernel/arm64/kernel-qemu
-scale 0.7
-memory 2048
-partition-size 4096
-no-window
-verbose

Android AVD Manager Linux, Error: No space left on device Error: AVD not created

I am running android-sdk-linux on my kali linux KDE Laptop which is having a problem when trying to create an avd when I use the GUI or the AVD Manager it says no space left on device and when trying to use command line it says Error: No space left on device
Error: AVD not created. I am clueless as what the problem could be, because I don't see many reports on this... I am trying to make an android 5.01 Virtual Device with armeabi-v7a
Also when I am done the AVD appears in /root/.android/avd
But when I run it using ./emulator #AVD1 I get:
PANIC: Could not open AVD config file: /root/.android/avd/AVD1.avd/config.ini
And I checked and that file doesnt even exist!

Android 5.0 emulator showing Storage space running out

I just updated Android SDK to version 21 and trying to start emulator. I am using Nexus 4 with CPU Intel atom (x86) 768 RAM and 524 internal storage. Emulator starts fine but it shows en error message, "Storage space running out" and it is very slow. I tried increasing the RAM also but didn't work. What could be the issue?
Open AVD Manager --> Wipe Data
You have to go in your android folder e.g. on OSX ~/.android/avd/{YOUR_AVD_NAME} and edit file config.ini.
Just add or modify row disk.dataPartition.size = YOUR_SIZE
e.g. disk.dataPartition.size = 1G
Then you may have to wipe your emulator's disk.
emulator -avd "Name" -partition-size 500
This solved the issue for me.
Update on how to execute above command:
Go to a terminal
cd [android SDK directory]/tools/
linux terminal: ./emulator -avd nameOfAvd -partition-size 500 &
windows : emulator -avd nameOfAvd -partition-size 500
Go to AVD manager on your android studio.
click on the pencil icon of the virtual device.
on the pop up window click on advanced settings at the bottom.
scroll down to memory and storage and alter the default definitions of MB/GB etc.
REinstal the emulator..
Go to your AVD location and delete all the files in avd folder( C:\Users\acer.android\avd ),
then Go to android studio AVD Manager and install a new emulator.
( but this will erase the current emulator so, you'll need to download it again..)

Categories

Resources