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

Error when exporting to Android #144

Open
artiko99-b1 opened this issue May 26, 2023 · 7 comments
Open

Error when exporting to Android #144

artiko99-b1 opened this issue May 26, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@artiko99-b1
Copy link

Environment:

  • OS: Windows
  • Godot version: 4.0.3
  • godot-sqlite version: 4.0

Issue description:
When I export to android I get the error "No suitable library found for GDExtension: res://addons/godot-sqlite/gdsqlite.gdextension. Possible feature flags for your platform: mobile, android, etc2, astc, arm64, arm64-v8a, template, debug, template_debug"
I can install the generated APK/AAB file on android but the Sqlite functions are ignored so the app on mobile does not work.

What I have found out:
I have looked in the gdsqlite.gdextension file and I have seen that it does not have the libraries it should use for android. It doesn't have the depencies either.
I have edited the file adding the missing entries and now the Android export works correctly.
Please correct the gdsqlite.gdextension file with the missing entries.

@artiko99-b1 artiko99-b1 added the bug Something isn't working label May 26, 2023
@2shady4u
Copy link
Owner

2shady4u commented Jun 5, 2023

I will add the binaries to the gdsqlite.gdextension-file ASAP.
To speed up this process, would it be possible to show me the missing entries that you added?

@artiko99-b1
Copy link
Author

artiko99-b1 commented Jun 5, 2023

These are the missing entries that I´ve added to gdsqlite.gdextension file:
In [libraries] section:
android.arm64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_debug.arm64.so"
android.template_release.arm64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_release.arm64.so"
android.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_debug.x86_64.so"
android.template_release.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_release.x86_64.so"

In [dependencies] section:
android.arm64 = {}
android.template_release.arm64 = {}
android.x86_64 = {}
android.template_release.x86_64 = {}

That's all.

@Labanazario
Copy link

@artiko99-b1 but you managed to make the database work after that? Like read/write to the db in Android, because in my case it wont work even if I do this gdextension modification. It exports but do not actually work when reading something from the db.

@artiko99-b1
Copy link
Author

@Labanazario
My database is read-only. I don't have to copy it to the user:// folder.
Before the fix, I was getting the error mentioned in the first post, and the version exported to my Android device was unusable.
Now it works as expected.

@2shady4u
Copy link
Owner

@artiko99-b1
Adding these library entries to the gdsqlite.gdextension-file doesn't seem to be sufficient to make it work on Android on my end:

ERROR: No suitable library found for GDExtension: res://addons/godot-sqlite/gdsqlite.gdextension. Possible feature flags for your platform: mobile, android, etc2, astc, arm32, armeabi-v7a, arm64, arm64-v8a, template, debug, template_debug
   at: (./editor/plugins/gdextension_export_plugin.h:114)

The latest gdsqlite.gdextension-file can be found here.

@vtgreybeard
Copy link

Fwiw, I am getting the exact same error when exporting to Android:
No suitable library found for GDExtension: res://addons/godot-sqlite/gdsqlite.gdextension. Possible feature flags for your platform: mobile, android, etc2, astc, arm32, armeabi-v7a, arm64, arm64-v8a, template, debug, template_debug

I am using the stock/provided gdsqlite.gdextension file as well.

Also, it did previously export properly when I was using Godot v4.0.1 with an (unknown) previous version of this plugin.

@cyberpuffin-digital
Copy link

cyberpuffin-digital commented Aug 21, 2023

I hit this issue when exporting for Android as well (Godot 4.1.1, godot-sqlite 4.2). If I understand the issue correctly, it's because there is no binary for the 32 bit Android architectures (armeabi-v7a and x86). Once I removed those target architectures from my build, everything worked as expected. I can read and write databases in the user space on my builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants