Skip to main content
improve code
Source Link
Kostas Drak
  • 3.3k
  • 6
  • 30
  • 60

I had the same problem and fix it this way:

My app was ~18MB weightsize, and when I see how much memory left free I was shocked - 654KB (on 1GB RAM!). So I just deleted almost all images from project and downloaded them from the internet on first start, and use pics from SD card when needed.

To check total/free memory for your app use:

 Runtime.getRuntime().totalMemory(); Runtime.getRuntime().freeMemory(); 

EDIT: I forgot the main thing - add in your manifest, between application tag, this line:

android:largeHeap="true"android:largeHeap="true"

I had the same problem and fix it this way:

My app was ~18MB weight, and when I see how much memory left free I was shocked - 654KB (on 1GB RAM!). So I just deleted almost all images from project and downloaded them from the internet on first start, and use pics from SD card when needed.

To check total/free memory for your app use:

 Runtime.getRuntime().totalMemory(); Runtime.getRuntime().freeMemory(); 

EDIT: I forgot the main thing - add in your manifest, between application tag, this line:

android:largeHeap="true"

I had the same problem and fix it this way:

My app was ~18MB size, and when I see how much memory left free I was shocked - 654KB (on 1GB RAM!). So I just deleted almost all images from project and downloaded them from the internet on first start, and use pics from SD card when needed.

To check total/free memory for your app use:

 Runtime.getRuntime().totalMemory(); Runtime.getRuntime().freeMemory(); 

EDIT: I forgot the main thing - add in your manifest, between application tag, this line:

android:largeHeap="true"

I had the same problem and fix it this way:

My app was ~18MB weight, and when I see how much memory left free I was shocked - 654KB (on 1GB RAM!). So I just deleted almost all images from project and downloaded them from the internet on first start, and use pics from SD card when needed.

To check total/free memory for your app use:

 Runtime.getRuntime().totalMemory(); Runtime.getRuntime().freeMemory(); 

EDIT: I forgot the main thing - add in your manifest, between activity tagsapplication tag, this line:

android:largeHeap="true"

I had the same problem and fix it this way:

My app was ~18MB weight, and when I see how much memory left free I was shocked - 654KB (on 1GB RAM!). So I just deleted almost all images from project and downloaded them from the internet on first start, and use pics from SD card when needed.

To check total/free memory for your app use:

 Runtime.getRuntime().totalMemory(); Runtime.getRuntime().freeMemory(); 

EDIT: I forgot the main thing - add in your manifest, between activity tags, this line:

android:largeHeap="true"

I had the same problem and fix it this way:

My app was ~18MB weight, and when I see how much memory left free I was shocked - 654KB (on 1GB RAM!). So I just deleted almost all images from project and downloaded them from the internet on first start, and use pics from SD card when needed.

To check total/free memory for your app use:

 Runtime.getRuntime().totalMemory(); Runtime.getRuntime().freeMemory(); 

EDIT: I forgot the main thing - add in your manifest, between application tag, this line:

android:largeHeap="true"

I had the same problem and fix it in nextthis way: My

My app was ~18MB weight, and when I see how much memory left free I was shocked - 654KB (on 1GB RAM!). So I just deleted almost all images from project and downloaddownloaded them from NETthe internet on first start, and use pics from SD card when needed. To

To check total/free memory for your app use:

 Runtime.getRuntime().totalMemory(); Runtime.getRuntime().freeMemory(); 

IDITEDIT: I forgot the main thing - add in your manifest, between activity tags, nextthis line:

android:largeHeap="true"

I had the same problem and fix it in next way: My app was ~18MB weight, and when I see how much memory left free I was shocked - 654KB (on 1GB RAM!). So I just deleted almost all images from project and download them from NET on first start and use pics from SD card when needed. To check total/free memory for your app use:

 Runtime.getRuntime().totalMemory(); Runtime.getRuntime().freeMemory(); 

IDIT: I forgot the main - add in your manifest, between activity tags, next line:

android:largeHeap="true"

I had the same problem and fix it this way:

My app was ~18MB weight, and when I see how much memory left free I was shocked - 654KB (on 1GB RAM!). So I just deleted almost all images from project and downloaded them from the internet on first start, and use pics from SD card when needed.

To check total/free memory for your app use:

 Runtime.getRuntime().totalMemory(); Runtime.getRuntime().freeMemory(); 

EDIT: I forgot the main thing - add in your manifest, between activity tags, this line:

android:largeHeap="true"

added 119 characters in body
Source Link
Vitas
  • 2.4k
  • 2
  • 14
  • 5
Loading
Source Link
Vitas
  • 2.4k
  • 2
  • 14
  • 5
Loading