Android emulator from the command line has a strange resolution

I am creating an Android emulator for testing Espresso from a terminal through this command:

./avdmanager create avd -n TestEmulator1 -k "system-images;android-25;google_apis;x86_64" -c 2000M --tag "google_apis" --device "Nexus 5X"

However, when I run the emulator, the resolution is really off

enter image description here

When I check it in the AVD Manager from Android Studio, it looks like the settings are correct. Is there something missing in my team that causes this problem? This causes all my tests to crash on startup. Thank!

+4
source share
2 answers

Add the required skin resolution as follows:

./avdmanager create avd -n TestEmulator1 -k "system-images;android-25;google_apis;x86_64" -c 2000M --tag "google_apis" --device "Nexus 5X"

./emulator -avd TestEmulator1 -no-window -skin 768x1280 &

Or try if something like this ( -s "768x1280") is still working with the new one avdmanager:

android create avd --force -n nexus4-emulator -t "Google Inc.:Google APIs:"$EMULATOR_VERSION --abi $ANDROID_ABI -s "768x1280" --device "Nexus 4" -c 128M

.

+1

, emulator -skin "1440x2560" - , .

"Pixel XL". , Android SDK " ", , , -, . , , -skin, ().

+1

Source: https://habr.com/ru/post/1675625/


All Articles