Inflateexception: Binary Xml File Line #1: Error Inflating Class <Unknown> Caused by Outofmemoryerror

InflateException: Binary XML file line #1: Error inflating class unknown caused by OutOfMemoryError

Check your drawable/background_main i.e. the background image of your root layout - the VM runs out of memory when decoding the bitmap. Make the image dimensions smaller.

InflateException: Binary XML file line #21: Error inflating class unknown caused by OutOfMemoryError

You have a bunch of ImageView widgets on which you are using android:background rather than android:src. It is unclear why you are doing this.

Regardless, on one of those, you are attempting to load a drawable resource that, when decoded, would take up 9437196 bytes of heap space. That is the equivalent of a 1536x1536 image. This is much too large.

So, switch to android:src and use much lower-resolution bitmaps. The size of the bitmaps on disk is irrelevant.

Also, if you happened to put these images in res/drawable/, bear in mind that this is synonymous with res/drawable-mdpi/ and indicates that your images should be upscaled for higher-density screens.

Android: InflateException: Binary XML file line : Error inflating class unknown

it would be better if u change the size of images you using. may be that sizes not capable for that device you using.

android.view.InflateException: Binary XML file line #1: Error inflating class android.widget.RelativeLayout

My picture was 5000x7000(TOO BIG!). Fixed by resizing it!

android.view.InflateException: Binary XML file line #24: Error inflating class unknown

i added

android:largeHeap="true"

to my AndroidManifest.xml inside application tag and seem's like It works, at least for the crash casuistic. Hope It keeps well-functioning...



Related Topics



Leave a reply



Submit