Reputation: 53317
I get some very unhelpful errors from Qt creator, which I have just installed using 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.
I don't really get what does it mean. This is my configuration:
I also tried selecting Use Gradle instead of Ant. it didn't affect anything. What expecially freaks me out is the awkward error: The following error occurred while executing this line:
without mentioning any actual error.
Upvotes: 1
Views: 2893
Reputation: 1267
The problem related with memory. You must have enough RAM on system. If not then please add large swap. This would allow dx to complete build and not die in middle. I was facing this issue on small VPS node. Now its fixed.
Upvotes: 1
Reputation: 715
Here is how to fix it:
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.
Upvotes: 1