3

I have problems starting emulator on Gitlab CI. There is an error I get:

ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at /usr/local/android-sdk/emulator/lib64/qt/lib
Could not launch '/usr/local/android-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64': No such file or directory

when executing

$ANDROID_HOME/tools/emulator -verbose -avd test -no-accel -no-snapshot -no-window -no-audio -camera-back none -camera-front none -selinux permissive -qemu -m 2048 &

(note: there is no $ANDROID_HOME/emulator directory for some reason)

AVD is created successfully with:

echo no | $ANDROID_HOME/tools/bin/avdmanager create avd --force -k "system-images;android-27;default;x86_64" -n test

as it shows in output of $ANDROID_HOME/tools/emulator -list-avds

I tried different emulators, also armeabi-v7a.

Let me know what info you need to help solve the issue.

TIA

MaciejGórski
  • 22,187
  • 7
  • 70
  • 94
  • 1
    Check this: https://stackoverflow.com/a/44822312/2910520 You should not use emulator script inside the tools folder, but the one in the emulator folder – MatPag Mar 03 '20 at 10:15
  • @MatPag I would definitely try doing that, but the `/emulator` dir doesn't exist as noted in the question :) – MaciejGórski Mar 03 '20 at 10:20
  • If you don't have the emulator folder you have a problem with your SDK installation. In the SDK folder connected to my Android Studio the folder is there. I would suggest you to double check or try re-downloading the SDK from developer site and trying to download some new emulator images to see if the folder appears – MatPag Mar 03 '20 at 10:22
  • For example, check this [Dockerfile script](https://github.com/thyrlian/AndroidSDK/blob/125cc52425284f7d20445ce2fa914a6f05a5123d/android-sdk/Dockerfile#L47) on how the SDK folder is downloaded and configured, there are references to the emulator folder – MatPag Mar 03 '20 at 10:27
  • Locate sdkmanager in tools/bin and use this command: "./sdkmanager emulator" more information in https://developer.android.com/studio/command-line/sdkmanager – Feri Mar 06 '20 at 07:47
  • @Feri Thank you! Can you make it as an answer, so I could share my (worthless) internet points with you? :) – MaciejGórski Mar 06 '20 at 09:41

1 Answers1

2

As said in my comment, locate sdkmanager in tools/bin and use this command: ./sdkmanager emulator. Then run the emulator binary inside newly-created emulator directory.

More information in developer.android.com/studio/command-line/sdkmanager

Feri
  • 1,071
  • 7
  • 19