java.lang.OutOfMemoryError: bitmap size exceeds VM budget

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via github.com by Unknown author

For most cases,recommend that you use the Glide library to fetch, decode, and display bitmaps in your app. Glide abstracts out most of the complexity in handling these and other tasks related to working with bitmaps and other images on Android.

Solutions on the web

via GitHub by opendatakit-bot
, 1 year ago
bitmap size exceeds VM budget
via GitHub by mitchellsundt
, 11 months ago
bitmap size exceeds VM budget
via Google Groups by Ryo_andorid, 3 months ago
via bigresource.com by Unknown author, 1 year ago
via Stack Overflow by nirav
, 2 years ago
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.BitmapFactory.nativeDecodeStream(NativeMethod)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:459)
at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:271)
at org.odk.collect.android.widgets.ImageWidget.buildView(ImageWidget.java:197)
at org.odk.collect.android.widgets.WidgetFactory.createWidgetFromPrompt(WidgetFactory.java:86)
at org.odk.collect.android.views.QuestionView.buildView(QuestionView.java:85)
at org.odk.collect.android.activities.FormEntryActivity.createView(FormEntryActivity.java:494)
at org.odk.collect.android.activities.FormEntryActivity.refreshCurrentView(FormEntryActivity.java:290)
at org.odk.collect.android.activities.FormEntryActivity.onResume(FormEntryActivity.java:1049)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
at android.app.Activity.performResume(Activity.java:3763)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2937)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2965)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1889)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4363)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
3 times, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
33 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.