我从Qt创建者那里得到了一些非常无用的错误,我刚刚使用tutorial on Qt website安装了该错误。
-dex: [dex] input: D:\techsys\build-androidtest-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_1-Debug\android-build\bin\classes [dex] input: D:\techsys\build-androidtest-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_1-Debug\android-build\libs\QtAndroid-bundled.jar [dex] input: D:\techsys\build-androidtest-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_1-Debug\android-build\libs\QtAndroidAccessibility-bundled.jar [dex] Pre-Dexing D:\techsys\build-androidtest-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_1-Debug\android-build\libs\QtAndroid-bundled.jar -> QtAndroid-bundled-15710ac48ee3b8e0790e2c0724eced85.jar [dx] Error occurred during initialization of VM [dx] Could not reserve enough space for object heap [dx] Error: Could not create the Java Virtual Machine. [dx] Error: A fatal exception has occurred. Program will exit. BUILD FAILED C:\Users\mareda\AppData\Local\Android\android-sdk\tools\ant\build.xml:888: The following error occurred while executing this line: C:\Users\mareda\AppData\Local\Android\android-sdk\tools\ant\build.xml:890: The following error occurred while executing this line: C:\Users\mareda\AppData\Local\Android\android-sdk\tools\ant\build.xml:902: The following error occurred while executing this line: C:\Users\mareda\AppData\Local\Android\android-sdk\tools\ant\build.xml:283: null returned: 1 Total time: 1 second Building the android package failed! -- For more information, run this command with --verbose. 11:50:50: The process "C:\Qt\android.5.5.1\5.5\android_armv7\bin\androiddeployqt.exe" exited with code 14. Error while building/deploying project androidtest (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.5.1)) When executing step "Build Android APK" 11:50:50: Elapsed time: 00:05.
我真的不明白这是什么意思。这是我的配置:
我还尝试选择使用Gradle而不是Ant 。它并没有影响任何事情。特别令我烦恼的是尴尬的错误:The following error occurred while executing this line:
没有提到任何实际错误。
答案 0 :(得分:1)
以下是修复方法:
Go to Start->Control Panel->System->Advanced(tab)->Environment Variables->System Variables->New:
Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M
Variable name: Path
Variable value: ;C:\Program Files\Java\jre6\bin;F:\JDK\bin;
Change this to your appropriate path.
答案 1 :(得分:1)
与记忆有关的问题。系统上必须有足够的RAM。如果没有那么请添加大量交换。这将允许dx完成构建而不是在中间死亡。我在小型VPS节点上遇到了这个问题。现在已修复。