diff --git a/editor/export/project_export.cpp b/editor/export/project_export.cpp index ae6ed9b6f2..8b248ba58b 100644 --- a/editor/export/project_export.cpp +++ b/editor/export/project_export.cpp @@ -1425,8 +1425,12 @@ void ProjectExportDialog::_export_project() { export_project->add_filter("*." + extension, vformat(TTR("%s Export"), platform->get_name())); } - if (!current->get_export_path().is_empty()) { - export_project->set_current_path(current->get_export_path()); + String path = current->get_export_path(); + if (!path.is_empty()) { + if (extension_list.find(path.get_extension()) == nullptr && extension_list.size() >= 1) { + path = path.get_basename() + "." + extension_list.front()->get(); + } + export_project->set_current_path(path); } else { if (extension_list.size() >= 1) { export_project->set_current_file(default_filename + "." + extension_list.front()->get()); diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index a5020db29f..050bc113d3 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -3116,8 +3116,12 @@ bool EditorExportPlatformAndroid::has_valid_project_configuration(const Ref EditorExportPlatformAndroid::get_binary_extensions(const Ref &p_preset) const { List list; - list.push_back("apk"); - list.push_back("aab"); + int export_format = int(p_preset->get("gradle_build/export_format")); + if (export_format == EXPORT_FORMAT_AAB) { + list.push_back("aab"); + } else { + list.push_back("apk"); + } return list; }