Terrain3D: Android build doesn't work

Whenever I try loading a scene that has Terrain3D node on it, it just won’t load, no errors thrown in the output nor the debugger, can’t really say what’s going on, appart from a build error when exporting to my test device:

 No suitable library found for GDExtension: res://addons/terrain_3d/terrain.gdextension. Possible feature flags for your platform: mobile, android, etc2, astc, arm64, arm64-v8a, template, debug, template_debug
  Cannot erase nonexistent section "params".

I’ve added the missing flags on my feature export side, but that did not change anything.

But actually looking at the libraries list:

macos.debug = "bin/libterrain.macos.debug.framework"
macos.release = "bin/libterrain.macos.release.framework"
windows.debug.x86_64 = "bin/libterrain.windows.debug.x86_64.dll"
windows.release.x86_64 = "bin/libterrain.windows.release.x86_64.dll"
linux.debug.x86_64 = "bin/libterrain.linux.debug.x86_64.so"
linux.release.x86_64 = "bin/libterrain.linux.release.x86_64.so"
linux.debug.arm64 = "bin/libterrain.linux.debug.arm64.so"
linux.release.arm64 = "bin/libterrain.linux.release.arm64.so"
linux.debug.rv64 = "bin/libterrain.linux.debug.rv64.so"
linux.release.rv64 = "bin/libterrain.linux.release.rv64.so"

It’s not really supposed to work on mobiles?

I’ve seen the #137 Issue, but that seemed to at least load?

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 52 (25 by maintainers)

Most upvoted comments

OK, we’ll say it works for now in 4.2 as experimental. Thanks.

The 0.9 branch now builds android in the release package now, and has a fix for 4.2. Can anyone else build Terrain3D 0.9 or use this artifact and get it working on android using 4.2?

@directedchaossoftware Android Gdextension is reportedly broken in 4.1 until the new rewrite. The only person who has been able to make Terrain3D work on Android is the one rewriting the engine code. 4.2 won’t be out until November, and android support in Terrain3D is on hold until it is available, the process for supporting android in Gdextension is documented and easy enough to follow, and/or the rewriter helps us support Android.

https://github.com/godotengine/godot/pull/80740 was merged into 4.2. No docs or 4.1 yet.

Ah good find. His PR says specifically, This refactor focuses on cleaning up and restoring full functionality for Godot Android plugins, which have effectively been (partially) broken since the Godot 4.0 release.

This Issue is on hold for now unless he comes in with a solution or we know that the upstream process is working for gdextensions. Specifically that PR is merged in, the android sample template, and documentation of a working process from C++ gdextension to android export is finished. He’s got a lot of additional files in his sample project. It doesn’t look like it’s trivial to setup for android. I will exclude android builds from my point releases until then.

Thank you. Strangely the screenshot mentions

Not sure though while i tried experimenting with dll rename, though i didn’t use it at the end for the screenshot and has the same errors as .so also maybe this could be happening because of this pr not being merged https://github.com/godotengine/godot/pull/80740 maybe it could fix it.

Screenshot_2023-09-01-11-25-25-79_40deb401b9ffe8e1df2f1cc5ba480b12

But that opens the question of how was he able to get it to work, unless he used his custom build.