Godot Version
godot-4
Question
I am unable to run my game in android without including my source code in the assets folder. The documentation says I should use --main-pack <pck_or_zip_filepath_relative_to_assets_dir>
but after exporting my game to the assets folder as game.pck
and setting the commandline to --main-pack game.pck
I get the following error:
1: USER ERROR: Cannot open resource pack ‘game.pck’.
2: at: _setup (core/config/project_settings.cpp:534)
3: Error: Couldn’t load project data at path “.”. Is the .pck file missing?
4: If you’ve renamed the executable, the associated .pck file should also be renamed to match the executable’s name (without the extension).
5: Unable to setup the Godot engine! Aborting…
At this point I thought maybe the .zip will work but when doing that I get the following error:
1: USER ERROR: Condition “f.is_null()” is true. Returning: nullptr
2: at: godot_open (core/io/file_access_zip.cpp:51)
3: USER ERROR: Parameter “zfile” is null.
4: at: try_open_pack (core/io/file_access_zip.cpp:171)
5: USER ERROR: Cannot open resource pack ‘project.zip’.
6: at: _setup (core/config/project_settings.cpp:534)
7: Error: Couldn’t load project data at path “.”. Is the .pck file missing?
8: If you’ve renamed the executable, the associated .pck file should also be renamed to match the executable’s name (without the extension).
9: Unable to setup the Godot engine! Aborting…
Including all my game files in the assets dir without using --main-pack
works but I would prefer not contain all my game code there.