2013-09-03 8 views
8

जब मैं अपने स्थानीय मशीन पर प्रोग्रार्ड को अपने ग्रैडल बिल्ड के भीतर से चलाने की कोशिश करता हूं, तो मुझे "जावा हीप स्पेस" त्रुटि मिलती है। विशेष रूप से:एंड्रॉइड ग्रैडल में प्रोग्रार्ड चलाने वाले ढेर से बाहर निकलना

:<app_name>:proguardRelease FAILED 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':<app_name>:proguardRelease'. 
> Java heap space 

मैं अपने GRADLE_OPTS की स्थापना = -Xmx2048m की कोशिश की, लेकिन मैं अभी भी ढेर अंतरिक्ष त्रुटि मिल रही है।

कोई सुझाव?

:Tinder:proguardRelease 
ProGuard, version 4.9 
Reading input... 
Reading program directory [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/classes/release] 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/exploded-bundles/library.aar/classes.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/libs/androidannotations-api-2.7.1.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/libs/picasso-1.1.1.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/libs/gcm.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/exploded-bundles/ViewPagerIndicator.aar/classes.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/exploded-bundles/nineoldandroids.aar/classes.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/libs/crittercism_v3_0_11_sdkonly.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/libs/google-play-services.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/exploded-bundles/facebook.aar/classes.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/exploded-bundles/PullToRefresh.aar/classes.jar] (filtered) 
Reading program jar [/Applications/android-studio.app/sdk/extras/android/m2repository/com/android/support/support-v4/13.0.0/support-v4-13.0.0.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/libs/apphance-library.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/exploded-bundles/simple-crop-image-lib.aar/classes.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/exploded-bundles/windowed-seek-bar.aar/classes.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/libs/com.kontagent.android.sdk.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/exploded-bundles/ActionBarSherlock.aar/classes.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/exploded-bundles/google-play-services_lib.aar/classes.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/libs/gson-2.2.4.jar] (filtered) 
Reading program jar [/Users/jabdulius/Documents/Dropbox/workspace-tinder/Tinder/build/exploded-bundles/volley.aar/classes.jar] (filtered) 
Reading library jar [/Applications/android-studio.app/sdk/platforms/android-17/android.jar] 
:Tinder:proguardRelease FAILED 

उत्तर

14

आप भी (Linux और BSD पर) वातावरण चर निर्यात किया था:

यहाँ मेरी लॉग उत्पादन के अंत है?

export GRADLE_OPTS=-Xmx2048m 
+0

धन्यवाद! एक जादू की तरह काम करता है। मेरे निर्माण को उस त्रुटि को 'shrinkReleaseMultiDexComponents' पर मिला। –

3

किसी AndroidStudio के भीतर इस समस्या में चलाता है, Gradle बिना, समाधान ProGuard करने के लिए कुछ स्मृति जोड़ने के लिए है:

Android Studio >> Preferences >> Compilers >> 
Android Compiler >> Proguard Options = -Xmx2048m 
संबंधित मुद्दे