简体   繁体   English

在 Gitlab CI 上运行 Android 模拟器

[英]Running Android emulator on Gitlab CI

I have problems starting emulator on Gitlab CI.我在 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) (注意:由于某种原因没有 $ANDROID_HOME/emulator 目录)

AVD is created successfully with: AVD 成功创建:

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正如它在$ANDROID_HOME/tools/emulator -list-avds输出中$ANDROID_HOME/tools/emulator -list-avds

I tried different emulators, also armeabi-v7a .我尝试了不同的模拟器,还有armeabi-v7a

Let me know what info you need to help solve the issue.让我知道您需要哪些信息来帮助解决问题。

TIA TIA

As said in my comment, locate sdkmanager in tools/bin and use this command: ./sdkmanager emulator .正如我在评论中所说,在tools/bin找到sdkmanager并使用以下命令: ./sdkmanager emulator Then run the emulator binary inside newly-created emulator directory.然后在新创建的emulator目录中运行模拟器二进制文件。

More information in developer.android.com/studio/command-line/sdkmanager developer.android.com/studio/command-line/sdkmanager 中的更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM