문제

I have a test for my Android application, and it's running without problems. But when I added clickOnView for one button it failed after clicking, Like:

Test run failed: Instrumentation run failed due to 'java.lang.OutOfMemoryError' bitmap size exceeds VM budget

Do you have any ideas why can this be happening? Should I create another AVD with bigger SD-card size? In the one I'm using I have 128MB.

도움이 되었습니까?

해결책

The OutOfMemoryError has nothing to do with the AVM you created nor the SD-card you have set up.

The amount of memory used to handle your bitmaps is simple too big. You probably use bitmaps that are too big in dimension and/or too many of them.

You should check how you handle bitmaps in your application and/or test and see if you can improve them.

Useful reading: Displaying Bitmaps Efficiently

다른 팁

Well, here's the solution, maybe it's gonna be useful for somebody. In my AVD properties I've changed the Max VM application heap size to 64 (it used to be 24), and the problem is gone.

Please goto your project properties-->java build path hit on order and Export tab mark 1.yourProject/src 2.yourProject/gen hit on libraries make sure acra file in list hit on ok then clean your project.. and run it..

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top