Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | NarcoticV |
(Note: edited to have a minimal example)
Hi everyone!
It seems that the Android “Use custom build” template is not compatible with including .so libraries - or at least not with those included in the “godot_ovrmobile” addon for Oculus Quest 2.
Minimal example: I started an empty project and following the steps from https://docs.godotengine.org/en/stable/tutorials/vr/developing_for_oculus_quest.html. After those steps, doing a remote run on the Quest works fine.
Then, in export settings, I checked “Use Custom Build” and installed the build template. Doing a remote run again, everything seems to build fine and I can deploy on the Quest. However, the app doesn’t start. When remote debug is enabled, the following errors appear to be happening at run-time:
E 0:00:00.221 open_dynamic_library: Can't open dynamic library: libgodot_ovrmobile.so, error: dlopen failed: library "libgodot_ovrmobile.so" not found.
C++ Error Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN
C++ Source platform/android/os_android.cpp:228 @ open_dynamic_library()
E 0:00:00.305 open_dynamic_library: Can't open dynamic library: libgodot_ovrmobile.so, error: dlopen failed: library "libgodot_ovrmobile.so" not found.
C++ Error Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN
C++ Source platform/android/os_android.cpp:228 @ open_dynamic_library()
E 0:00:00.305 get_symbol: No valid library handle, can't get symbol from GDNative object
C++ Source modules/gdnative/gdnative.cpp:502 @ get_symbol()
E 0:00:00.305 init_library: No nativescript_init in "res://addons/godot_ovrmobile/libs/arm64-v8a/libgodot_ovrmobile.so" found
C++ Source modules/gdnative/nativescript/nativescript.cpp:1479 @ init_library()
upon inspecting the generated .apk, I can see that the .so has been bundled in /assets/addons/godot_ovrmobile/libs/arm64-v8a/. However, with the default export, it is located in the /libs folder in the APK, which I guess is where it should be.
I don’t know whether this is a bug or not, but either way I also don’t know how to fix the build template to include the .so in the proper place. Can anyone help me out with this?
Cheers!