Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android export does not include native libraries when using Custom Template #49878

Closed
madmiraal opened this issue Jun 24, 2021 · 1 comment · Fixed by #49911
Closed

Android export does not include native libraries when using Custom Template #49878

madmiraal opened this issue Jun 24, 2021 · 1 comment · Fixed by #49911

Comments

@madmiraal
Copy link
Contributor

Godot version

3.3.2.stable

System information

Ubuntu 21.04

Issue description

Everything works fine when exporting to Android using the default template. However, when exporting to Android using the custom template, the project's native libraries are missing, and the following logcat errors are produced:

2021-06-23 17:35:37.925 5900-5957/org.godotengine.simple E/godot: **ERROR**: Can't open dynamic library: libsimple.android.x86.so, error: dlopen failed: library "libsimple.android.x86.so" not found.
2021-06-23 17:35:37.925 5900-5957/org.godotengine.simple E/godot:    At: platform/android/os_android.cpp:228:open_dynamic_library() - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN
2021-06-23 17:35:37.925 5900-5957/org.godotengine.simple E/godot: **ERROR**: No valid library handle, can't get symbol from GDNative object
2021-06-23 17:35:37.925 5900-5957/org.godotengine.simple E/godot:    At: modules/gdnative/gdnative.cpp:502:get_symbol() - No valid library handle, can't get symbol from GDNative object
2021-06-23 17:35:37.925 5900-5957/org.godotengine.simple E/godot: **ERROR**: No nativescript_init in "res://lib/libsimple.android.x86.so" found
2021-06-23 17:35:37.925 5900-5957/org.godotengine.simple E/godot:    At: modules/gdnative/nativescript/nativescript.cpp:1482:init_library() - No nativescript_init in "res://lib/libsimple.android.x86.so" found
2021-06-23 17:35:37.927 5900-5957/org.godotengine.simple E/godot: **SCRIPT ERROR**: Attempt to call function 'new' in base 'NativeScript' on a null instance.
2021-06-23 17:35:37.927 5900-5957/org.godotengine.simple E/godot:    At: res://Main.gdc:5:_ready() - Attempt to call function 'new' in base 'NativeScript' on a null instance.

Steps to reproduce

Add a native library to your project load and access it within your project. Export to Android, install it on a device or emulator and confirm that everything works.

Install the Android Build Template, check "Use Custom Build". Export to Android, install it on a device or emulator and confirm that the library is not there.

Minimal reproduction project

simple.zip

@m4gr3d
Copy link
Contributor

m4gr3d commented Jun 24, 2021

@madmiraal I'm not sure I understand the issue. Can you describe what you're trying to do, and the process (the more details the better!) through which you are able to accomplish that with the default template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants