Maven OutOfMemoryError: GC overhead limit exceeded

1,628 views
Skip to first unread message

Nike Dev

unread,
Mar 15, 2013, 5:08:09 AM3/15/13
to robol...@googlegroups.com

Why when I add to my pom.xml dependencies to Robolectric library I get OutOfMemoryError: GC overhead limit exceeded?

My dependency:

         <dependency>
             <groupId>com.pivotallabs</groupId>
             <artifactId>robolectric</artifactId>
             <version>1.2</version>
         </dependency>

When I remove it all working fine. When I add to android-maven-plugin next strings it has no sense

        <dexJvmArguments>
            <argument>-Xmx1500m</argument>
        </dexJvmArguments>

Aaron VonderHaar

unread,
Mar 16, 2013, 11:17:05 AM3/16/13
to robol...@googlegroups.com
Robolectric should only be used for running tests, and shouldn't need to be dexed into your apk.  I'd add <scope>test</scope> to your robolectric depdency.


--
You received this message because you are subscribed to the Google Groups "Robolectric" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robolectric...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
--Aaron V.
[ http://github.com/avh4 ]

Nike Dev

unread,
Mar 18, 2013, 5:09:46 AM3/18/13
to robol...@googlegroups.com
Thank you, Aaron. It's working

Mads Vering

unread,
Dec 18, 2013, 7:01:09 AM12/18/13
to robol...@googlegroups.com
I have the same issue as Nike Dev. When running unit tests with Robolectric 1.2 everything is fine. But when I try to start my app my Eclipse hangs and after a minute or two I get a Unhandled memory GC exception.

I do already have scope to "test":


        <dependency>
            <groupId>com.pivotallabs</groupId>
            <artifactId>robolectric</artifactId>
            <version>1.2</version>
            <scope>test</scope>
        </dependency>

Switching to 1.0, everything is working again, but a need 1.2 in order to use the android.util.Base64 in my unit test

Any ideas?
Reply all
Reply to author
Forward
0 new messages