Here’s a little fix for template/android/build_native.sh.
A potential problem happens when the filename of a resource being copied by the build_native.sh script has a space character in it.
Example: having “My Resource.png” in your resource folder causes the bash warning “binary operator expected” and fails to copy the file in the copy resources phase.
To fix it, simply enclose the \$file variable in the copy resources for loop with double quotes:
# copy resources
for file in $RESOURCE_ROOT/*
if [ -d "$file" ]; then
cp -rf "$file" $GAME_ANDROID_ROOT/assets
if [ -f "$file" ]; then
cp "$file" $GAME_ANDROID_ROOT/assets