Skip to Content
defold-typescript libraries
defold (official)

defold/extension-android

An example native extension for Android that combines C++, .java sources, a .jar, a prebuilt static library and Android resources. On Android it registers the androidnative Lua module with functions such as vibrate, getraw and multiply; other platforms get a stub extension with no module.

Lua API not typed — upstream ships no .script_api, so resolve skips it.

  • GitHub: defold/extension-android — pinned to 9e6e3d2
    1. This repo publishes no releases or tags. Add a commit archive URL — for the pinned commit, https://github.com/defold/extension-android/archive/9e6e3d286fff5388e9eaa2ee415e8b32f9d7ea07.zip — to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Build the project for Android.
    3. Check that androidnative is not nil before calling it, as the example menu GUI script does.
    4. See the java_src and lib_src build scripts for how the .jar and .a files are produced.