diff --git a/build.sh b/build.sh
index 8ba62ae5e422c182e088518e249a45d5de0a65cf..6d7f9e038923f0542dd618d70ff1878fb6b2f5ab 100755
--- a/build.sh
+++ b/build.sh
@@ -17,6 +17,11 @@ else
 	TARGET=`uname -p`
 fi
 
+# Unset the --arch-emulator if flatpak doesn't support it
+if [ ! -z "$ARCH_EMU_OPT" ] ; then
+	flatpak-builder --help | grep -q arch-emulator || ARCH_EMU_OPT=""
+fi
+
 echo ========== Building $APPID ================
 rm -rf app
 flatpak-builder $ARCH_OPT $ARCH_EMU_OPT --ccache --require-changes --repo=hello-repo --subject="${APPID} ${VERSION}" ${EXPORT_ARGS-} app $FILE && \