2015-11-09 26 views
1

我從Qt創建者那裏得到了一些非常無益的錯誤,我剛剛使用tutorial on Qt website安裝了這些錯誤。QtCreator甚至無法構建空項目 - 執行此行時發生以下錯誤

 
-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. 

我真的不明白這是什麼意思。這是我的配置:

image description

我也試過選擇使用搖籃,而不是螞蟻。它並沒有影響任何東西。特別讓我感到困惑的是尷尬的錯誤:The following error occurred while executing this line:沒有提到任何實際的錯誤。

+0

當您在「項目」選項卡的「構建步驟**」下的「** Build Android APK **」步驟中勾選「使用Gradle」時,您會得到什麼結果,並嘗試構建? – rob

回答

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. 
+0

但是我想只改變Qt創建者的設置,而不是整個操作系統! –

+0

也不起作用 –

+0

在給-1之前,請閱讀此內容。 http://forum.unity3d.com/threads/could-not-reserve-enough-space-for-object-heap-resolved.88119/ – Sigstop

1

與內存相關的問題。系統上必須有足夠的RAM。如果不是,那麼請添加大的交換。這將允許DX完成構建並且不會在中途死亡。我在小型VPS節點上遇到了這個問題。現在它是固定的。

相關問題