Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 70976424 byte allocation with 16777216 free bytes and 41MB until OOM code example

Example: java.lang.OutOfMemoryError: Failed to allocate a 345067788 byte allocation with 11479504 free bytes and 111MB until OOM

<application
    android:allowBackup="true"
    android:hardwareAccelerated="false"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:largeHeap="true"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

Tags:

Misc Example