BabylonNative for Android

I tried the BalylonNative with Android Studio.
It should open a simple playground demo in the Android simulator. But all I see is only an empty Android Simulator without any app running inside it.
Can anyone help?


Pinging @bghgary

Are there any errors in logcat or anywhere else? You should see a cube that you can spin by default.

Yes, there is an error:

Task :app:mergeDebugNativeLibs FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:mergeDebugNativeLibs’.

A failure occurred while executing$ActionFacade
More than one file was found with OS independent path ‘lib/x86/’. If you are using jniLibs and CMake IMPORTED targets, see

Do you know how to fix that?

So the build failed? Can’t say I’ve seen this error before. Are there multiple on your system. Did you run npm install in Apps\Playground\Android? Also are you using Windows to build?

I added to the app’s build.gradle under android these lines:

packagingOptions {
    pickFirst 'lib/x86/'

Now the build is ok but I still don’t see the Playground app in the android simulator. It shows only “text messages” app and “google” app.

now I found in logcat this error:
2021-01-09 15:03:10.828 6194-6222/ A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 6222 (tive.playground), pid 6194 (tive.playground)

While debugging, it seems, the problem is on glcontext_egl.cpp, line 234:

success = eglChooseConfig(m_display, attrs, &m_config, 1, &numConfig);
BGFX_FATAL(success, Fatal::UnableToInitialize, "eglChooseConfig");

success results to 0.

Make sure you follow the steps here: BabylonNative/ at master · BabylonJS/BabylonNative (