Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

OutOfMemory/Heap Space error (Can't import library into ADT/Eclipse) #108

Closed
jaybayley opened this issue Nov 7, 2013 · 16 comments
Closed

Comments

@jaybayley
Copy link

Hi there,

I'm not sure what i'm doing differently to you all, but I can't get this fantastic looking library to import into ADT/Eclipse (Build: v22.0.1-685705), and Google/Stack Overflow isn't turning up any results so i'm at a loss.

I have tried importing the library (Version 4), and the entire project (library and sample) into Eclipse using the standard Import > Android > Existing Android Code into Workspace which appears to work correctly, and doesn't show any errors. I then add the library as a dependancy in my project - again no errors.

I tried out some of the methods from the sample/docs, which eclipse correctly identified and let me import the relevant packages, however when I tried to Run my app, Eclipse continually increased the heap size until it ran out of memory and then crashed. I removed the ShowcaseView methods from my code and tried again, with the same outcome. I removed the ShowcaseView library as a dependancy of my app, and then my app runs correctly again.

I fiddled with various options for several hours last night, re-importing, cleaning etc and couldn't get the library to run. Can anyone give me any pointers or advice? A step-by-step guide to getting the library imported into ADT/Eclipse would be amazing, or at least anywhere that I may need to look for errors etc to help diagnose the problem.

Would love to be able to use this amazing library, as so many others appear to be able to.

@jaybayley
Copy link
Author

I should add that I had the same issue running the Sample app in isolation, so I don't believe there is a conflict with my code.

@amlcurran
Copy link
Owner

That's odd - sorry about that. I don't use Eclipse myself but will try to give it a look at this weekend!

@junker367
Copy link

I've got the same issue. I run an empty project (one activity with a "hello world") and it works correctly. Then, I only add the library ShowCaseView as a library into the empty project and not works. The heap space increase continually and crash the ide cause an OutOfMemory by an insufficent heap space.

MacBook Air 2013 (8GB) + Mavericks + ADT 22.0.0.v201305140200

@junker367
Copy link

Ok. The problem is Roboelectric2.2.20130909-210745-40-jar-with-dependencies.jar. It's imposible compilt it. ADT or Android Studio, is the same result. If I remove this library from the project, clone the git roboelectric repository, add this to the Showcase library and all works perfectly. ;)

@jaybayley
Copy link
Author

Thanks for the extra details @junker367, I shall give this a go and let you know how I get on!

@sevren
Copy link

sevren commented Nov 9, 2013

Same Issue here, @junker367 workaround fixed everything!

@jaybayley
Copy link
Author

Sorry @junker367, I feel a little foolish - but i've just attempted to try your instructions and I can't figure out what to do with robolectric. I've downloaded the robolectric library, but when I try to import it using Import > Android > Existing Android Code into Workspace, it's not finding any project to import - only 3 test libs. Would you mind pointing me in the right direction?

That said, after removing the offending jar file, I can build my app and ShowcaseView now works correctly - i'm just concerned that not having Roboelectric is going to cause problems somewhere else?

@amlcurran
Copy link
Owner

Not having Robolectric shouldn't cause any problems including the library into another project, but you won't be able to run the tests

@jaybayley
Copy link
Author

Thanks @Espiandev, I figured that may be the case but great to receive clarification.

@MarKco
Copy link

MarKco commented Nov 26, 2013

I removed Roboelectric from my library project as well in order to avoid the same issue, and it worked!

@rajunigadi
Copy link

I removed Roboelectric from library project and tests folder.. and it worked like charm.........

@rafi-kamal
Copy link

Same problem, solved by removing the Roboelectric library. I wish it would have been mentioned in the readme.

@lp43
Copy link

lp43 commented Feb 18, 2014

+1, solved by removing the Roboelectric library.

@vincenthauser
Copy link

I've spent sooo much time on this! And only now - when I solved it (by removing Roboelectric) - then I find this page :) Same here, I'm using Eclipse, haven't tried it out in Android Studio yet.

@leonardossantos
Copy link

I was having the same issue, luckly I found this topic.

@amlcurran amlcurran changed the title Can't import library into ADT/Eclipse OutOfMemory/Heap Space error (Can't import library into ADT/Eclipse) Apr 30, 2014
@reidisaki
Copy link

thank god i decided to google this.. I had the exact same issue, removing roboelectric worked.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests