Hi,
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?
Thanks,
Michal.
Hi,
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?
Thanks,
Michal.
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.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
More than one file was found with OS independent path ‘lib/x86/libv8android.so’. If you are using jniLibs and CMake IMPORTED targets, see New features in Android Studio Preview | Android Developers
Do you know how to fix that?
So the build failed? Can’t say I’ve seen this error before. Are there multiple libv8android.so 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/libv8android.so'
}
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/com.android.babylonnative.playground 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/AndroidSimulator.md at master · BabylonJS/BabylonNative (github.com)