How to solve java.lang.OutOfMemoryError trouble in Android

You can’t increase the heap size dynamically but you can request to use more by using. android:largeHeap=”true” in the manifest.xml,you can add in your manifest these lines it is working for some situations. <application android:allowBackup=”true” android:icon=”@mipmap/ic_launcher” android:label=”@string/app_name” android:largeHeap=”true” android:supportsRtl=”true” android:theme=”@style/AppTheme”> Whether your application’s processes should be created with a large Dalvik heap. This applies to … Read more