Android Emulator cannot start

Bitrise Build Issue Report template

Description of the issue

start-android-emulator Step just doesn’t work.

I’m trying to start Emulator to using for appium test with this spec:

Configs:
- Name: Android
- Platform: android-21
- Abi: armeabi-v7a
- Tag: default (google_apis is not work too)
- Options: 
- AndroidHome: /Users/vagrant/Library/Developer/Xamarin/android-sdk-macosx
- CustomHardwareProfileContent:

Environment:

Stack: Hybrid stack, with both Android tools and Xcode 8

Which build Step causes the issue and which version of the step?

start-android-emulator

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • If you have multiple different build configurations (workflows), does the issue affect all/more than one? : YES
  • If it’s an issue which happens sporadically, what’s the frequency? (e.g. Once a day ; about x% of the builds) : 100%
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : From the beginning.

Other stacks

Can it be reproduced by running the build locally with our CLI ( https://www.bitrise.io/cli ), after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )? NO

Build log

https://www.bitrise.io/build/f4547c5bec844b24

From the log:

$ /Users/vagrant/Library/Developer/Xamarin/android-sdk-macosx/emulator/emulator64-arm "-avd" "Android" "-skin" "768x1280" "-no-boot-anim" "-no-window"

emulator: ERROR: Could not load OpenGLES emulation library [lib64OpenglRender]: dlopen(lib64OpenglRender.dylib, 1): image not found
emulator: ERROR: Could not load OpenGLES emulation library [lib64OpenglRender]: dlopen(lib64OpenglRender.dylib, 1): image not found
emulator: warning: opening audio output failed

emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.

Did you try to pass in the -gpu off flag @han.tran?
Also, did you try to run this on the Linux/Android stack?

1 Like

Thanks for the reply. Yes, I did pass the -gpu off to the start emulator step, it able to start the emulator but on the hybrid stack I never success on install the apk. On Ubuntu Android stack I can start the emulator and install apk (sometimes fail on install step), but the appium test failed, local docker worked as usual)

1 Like

Hey!

What you can try also is to use -gpu swiftshader, for that you’ll need to export the env: DYLD_LIBRARY_PATH=$ANDROID_HOME/emulator/lib64:$ANDROID_HOME/emulator/lib64/qt/lib

To make all of this working please make sure that you have $ANDROID_HOME/tools/bin/sdkmanager "emulator" "tools" "platform-tools" updated correctly

1 Like