android - Bitmap size exceeds VM budget -
i passing image xml,by resize image size using:
scaled = bitmap.createscaledbitmap(bp, h, w, true); imgv.setimagebitmap(scaled);
but getting bitmap size exceeds vm budget.
04-30 18:36:16.552: error/androidruntime(7164): fatal exception: main 04-30 18:36:16.552: error/androidruntime(7164): java.lang.outofmemoryerror: bitmap size exceeds vm budget 04-30 18:36:16.552: error/androidruntime(7164): @ android.graphics.bitmapfactory.nativedecodeasset(native method) 04-30 18:36:16.552: error/androidruntime(7164): @ android.graphics.bitmapfactory.decodestream(bitmapfactory.java:460) 04-30 18:36:16.552: error/androidruntime(7164): @ android.graphics.bitmapfactory.decodestream(bitmapfactory.java:525) 04-30 18:36:16.552: error/androidruntime(7164): @ com.webrich.bachflower.topiccontroller.getimagebitmap(topiccontroller.java:103) 04-30 18:36:16.552: error/androidruntime(7164): @ com.webrich.bachflower.topiccontroller.oncreate(topiccontroller.java:73) 04-30 18:36:16.552: error/androidruntime(7164): @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1047) 04-30 18:36:16.552: error/androidruntime(7164): @ android.app.activitythread.performlaunchactivity(activitythread.java:1611) 04-30 18:36:16.552: error/androidruntime(7164): @ android.app.activitythread.handlelaunchactivity(activitythread.java:1663) 04-30 18:36:16.552: error/androidruntime(7164): @ android.app.activitythread.access$1500(activitythread.java:117) 04-30 18:36:16.552: error/androidruntime(7164): @ android.app.activitythread$h.handlemessage(activitythread.java:931) 04-30 18:36:16.552: error/androidruntime(7164): @ android.os.handler.dispatchmessage(handler.java:99) 04-30 18:36:16.552: error/androidruntime(7164): @ android.os.looper.loop(looper.java:123) 04-30 18:36:16.552: error/androidruntime(7164): @ android.app.activitythread.main(activitythread.java:3683) 04-30 18:36:16.552: error/androidruntime(7164): @ java.lang.reflect.method.invokenative(native method) 04-30 18:36:16.552: error/androidruntime(7164): @ java.lang.reflect.method.invoke(method.java:507) 04-30 18:36:16.552: error/androidruntime(7164): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:839) 04-30 18:36:16.552: error/androidruntime(7164): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:597) 04-30 18:36:16.552: error/androidruntime(7164): @ dalvik.system.nativestart.main(native method) 04-30 18:36:16.602: warn/activitymanager(63): force finishing activity com.webrich.bachflower/.topiccontroller 04-30 18:36:17.132: warn/activitymanager(63): activity pause timeout historyrecord{407ff648 com.webrich.bachflower/.topiccontroller} 04-30 18:36:19.762: debug/sntpclient(63): request time failed: java.net.socketexception: address family not supported protocol 04-30 18:36:20.212: info/process(7164): sending signal. pid: 7164 sig: 9 04-30 18:36:20.302: info/activitymanager(63): process com.webrich.bachflower (pid 7164) has died. 04-30 18:36:20.302: info/windowmanager(63): win death: window{407e6b88 com.webrich.bachflower/com.webrich.bachflower.flowercontroller paused=false} 04-30 18:36:20.362: error/inputdispatcher(63): channel '407fcdb8 com.webrich.bachflower/com.webrich.bachflower.topics (server)' ~ consumer closed input channel or error occurred. events=0x8 04-30 18:36:20.362: error/inputdispatcher(63): channel '407fcdb8 com.webrich.bachflower/com.webrich.bachflower.topics (server)' ~ channel unrecoverably broken , disposed! 04-30 18:36:20.412: info/windowmanager(63): win death: window{407fcdb8 com.webrich.bachflower/com.webrich.bachflower.topics paused=false} 04-30 18:36:20.882: warn/inputmanagerservice(63): got remoteexception sending setactive(false) notification pid 7164 uid 10034
is not duplicate of question: strange out of memory issue while loading image bitmap object
in particular, answer looking (#comment link): strange out of memory issue while loading image bitmap object
Comments
Post a Comment