qt creator android 构建失败 build.xml:283: 返回 null: 1

qt creator android Build Fail build.xml:283: null returned: 1

我正在尝试使用 qt creator 构建一个 android 应用程序,但我遇到了问题。它通常工作得很好,但现在它给我这个错误:

[dx] Error occurred during initialization of VM
[dx] Could not reserve enough space for 1048576KB object heap

BUILD FAILED C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:888: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:890: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:902: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:283: null returned: 1
Total time: 4 seconds
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl
Building the android package failed!
-- For more information, run this command with --verbose.
17:30:23: Le processus
"D:\Qt5.8.0_android.8\android_armv7\bin\androiddeployqt.exe" s'est terminé avec le code 14.
Erreur lors de la compilation/déploiement du projet untitled13 (kit : Android for armeabi-v7a (GCC 4.9, Qt 5.8.0))
When executing step "Build Android APK"

看来你有 apache 蚂蚁问题。

您应该将 SDK, NDK, JDK, apache ant 设置为您的 Qt Creator。

更多信息:Getting Started with Qt for Android

here

下载apache ant

用于开始构建和 运行 Qt Android 示例以确保所有这些在您的设备上正常工作。

使用 Gradle 而不是 Ant。 实际上 ant 已被弃用。