5

We have a customer app made for tablets and we need more than the regular heap, so our app defines the largeHeap="true" attribute for the application tag in AndroidManifest.xml. This works fine.

However, when we run tests on a device using android.test.InstrumentationTestRunner and android.test.ActivityInstrumentationTestCase2 we get java.lang.OutOfMemoryError when we try to use more than the standard heap.

We have tried setting largeHeap="true" in the AndroidManifest.xml of the test project as well as in the app project.

Running the tests on an emulator with a large heap size configured works. The setting increases the general max heap size, not the limit for largeHeap. This is a workaround, but we would like to run the tests on actual devices also.

Is there a way to run the tests on a device with a large heap?

trincot
  • 317,000
  • 35
  • 244
  • 286
donV
  • 1,091
  • 7
  • 15

0 Answers0