Help with building GDNative / C++ for Android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Harizio

Hello, I’m currently having troubles getting started with a C++ Android project in Godot.

I was able to build the cpp bindings for windows and get the C++ code built and implemented into Godot via a “.dll” file, but I can’t figure out the process for Android. Currently The C++ code I have doesn’t do much more than just move a sprite but it works perfectly both within the editor and a Windows build. However when I export for android, the apk exports and runs fine but seems to be missing the C++ scripts.

I think I’m somehow supposed to build a separate “.so” file to be included in the gdnlib file when exporting to Android but I can’t quite figure it out.

Also am I supposed to build different cpp bindings for android in SCons? I tried setting “platform=android” but it was invalid and only listed windows, linux and ios as valid options.

If anyone has any tips or previous experience in implementing C++ into an Android project in Godot I would greatly appreciate it.

:bust_in_silhouette: Reply From: jayanthl

I and TGRCdev have added GDNative support for android
The pull request has been merged with the master

Checkout this repo for details on GDNAtive arm64/arm android

“How to use” is given in readme.me