Try the gradle.properties file mentioned here:
https://medium.com/@cesarmcferreira/speeding-up-gradle-builds-619c442113cb#.3hq3aeoq1
that solved my memory issues, both dex and GC Overhead
On Tuesday, 23 August 2016 12:58:34 UTC-5, Igor Ganapolsky wrote:
>
> This didn't solve anything for me.
>
> On Friday, October 25, 2013 at 6:42:59 AM UTC-4, Avram Lyon wrote:
>>
>> Add this to your android closure:
>>
>> dexOptions {
>> incremental true
>> javaMaxHeapSize "4g"
>> }
>>
>> This solved all the GC overhead issues for my team, and we have
>> substantially more dependencies. Previously we would see that error on
>> almost every build.
>>
>> *Avram Lyon*
>> Android wrangler | Scopely, Inc.
>>
>> Refer The Smartest Person You Know And Pocket $5,000!
>> * Learn more: scopely.com/referrals
>> <http://www.scopely.com/referrals/?page=4>*
>>
>>
>> On Fri, Oct 25, 2013 at 12:10 AM, Martin Liersch <[email protected]>
>> wrote:
>>
>>> Hey everyone,
>>>
>>> I am having a big issue with my biggest project. I added Google Drive to
>>> it and now I get
>>>
>>> *java.lang.OutOfMemoryError: GC overhead limit exceeded*
>>>
>>> on the dexDebug task.
>>>
>>> For Drive I have added these dependencies:
>>>
>>> *compile 'com.google.android.gms:play-services:3.2.65'*
>>> *compile 'com.google.api-client:google-api-client:1.17.0-rc'*
>>> *compile 'com.android.support:support-v4:18.+'*
>>> *compile
>>> 'com.google.api-client:google-api-client-android:1.17.0-rc'*
>>> *compile
>>> 'com.google.apis:google-api-services-drive:v2-rev102-1.17.0-rc'*
>>> *compile 'com.google.api-client:google-api-client-gson:1.17.0-rc'*
>>>
>>> I have already tried providing *-Xmx2G*, *-XX:-UseGCOverheadLimit* and
>>> stuff, but it doesn't help...
>>>
>>> Do you have any idea how I might solve this? Has my project become too
>>> big for Gradle/dx to handle?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "adt-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.