Android export does not contain my code or assets

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

Hi,

I’ve spent the last 2 days trying to figure out this bug, and I can’t seem to fix it!

I am developing a Godot 2 game. We haven’t yet upgraded to 3, and started before 3 was fully released. So sorry if that annoys you - I love Godot 3 and our next project will be developed with it.

If you are still willing to help - I am trying to export our project to the android platform, on a headless server. I am using the official 2.1.5 server build from the Godot website, and using export templates from the same build. I have installed the Android SDK. However, when I run the command:

./Godot_v2.1.5-stable_linux_server.64 -path <path_to_project> -export Android ../game.apk

However, I get the following strange errors:

ERROR IN: res:///Characters/Missile.tscn.converted.scn  
ERROR: _get_modified_time: Method/Function Failed, returning: 0  
   At: drivers/unix/file_access_unix.cpp:235.  

(lots of repeat errors)

ERROR: _scan_new_dir: Cannot go into subdir: Components  
   At: editor/editor_file_system.cpp:615.  

(lots of repeat errors)

And the resulting apk is way too small (~8MB as opposed to the 25MB when exporting on my desktop). I think that all of the assets & code are not being copied into the apk - but why?

The server is an Ubuntu 64 bit server. I have found references to this problem on the github page, as I have been googling this for 2 days, but I can’t find an actual working solution from those issues. Also my project is not in a symlink. (Reworked change_dir to support symlinks by supagu · Pull Request #8144 · godotengine/godot · GitHub)

Thanks for any help you can provide!

Did you try to cd into your project directory (location of engine.cfg) and then call godot without project path? That’s how they do it in the Docs:
Command line tutorial — Godot Engine (2.1) documentation in English

user@host:~/newgame$ godot -export Android /var/builds/project.apk

So I’d start doing it like that.

Secondly, do you also develop in Linux, or do you develop in Windows?
A typical error would be not to honour case in file names which works in Windows but fails in many other platforms. But usually those errors only arise when loading resources by script (works in windows → fails in android) not when building.

wombatstampede | 2019-03-13 14:48